Hi there, I quite often get the alert message "Stack over


Problem not reconstructable locally.

Please try to use attached js file instead original one ( it has some related fixes but not sure is it solve your problem or not )
If problem still occurs for you - please provide any kind of sample where problem can be reconstructed.

dhtmlxgrid_selection.zip (2.51 KB)

I’m sorry, the attached file didn’t bring a solution for the problem. It’s hard to find any regularity in its behaviour but I have listed some points I noticed:

- The alert “Stack Overflow at line 1515” is shown when you release the mousebutton after selecting a block of rows or single cells (even one single cell!)
- The problem occurs more often by using the left than the right mousebutton, except for pushing the right mousebutton somewhere in the table, hold it pressed and release somewhere outside the table.
- I’m using Internet Explorer 6.0.2900. In Firefox the problem doesn’t come up, however it’s a project requirement to use IE in this version. Web framework is Struts 1.2.7.

----
For example I use a simple table with eight columns and a selection/copy functionality like this:

   
   
   
   
   
   
   

   
   

    …
                                                           




        mygrid = new dhtmlXGridObject(‘mygridbox’);
        mygrid.setImagePath("${pageContext.request.contextPath}/img/xGrid/");
        mygrid.setSkin(“light”);
        mygrid.setHeader(‘A,B,C,D,E,F,G,H’);
        mygrid.setInitWidths(“135,133,110,85,125,*,0,0”);
        mygrid.setColAlign(“left,center,left,left,left,left,center,center”);
        mygrid.setColTypes(“ro,ro,ro,ro,ro,ro,ro,ro”);

        mygrid.enableRowsHover(true, “TABLERowMouseOver”);
        mygrid.enableDistributedParsing(true,25);
        mygrid.enableSmartXMLParsing(true);
        mygrid.enableSmartRendering(true);
        mygrid.init();
       
        mygrid.loadXMLString(xmlString);
        mygrid.enableBlockSelection();

        mygrid.attachEvent(“onKeyPress”,onKeyPressed);
        mygrid.attachEvent(“onRowSelect”,onRowSelect);
   

    function onRowSelect(rid, cid){       
         showItem(mygrid.cells(rid,6).getValue(),mygrid.cells(rid,7).getValue());
        }

    function onKeyPressed(code,ctrl,shift){
        if(code==67&&ctrl){
            mygrid.setCSVDelimiter("\t");
            mygrid.copyBlockToClipboard();
        }
        return true;
        }

    function showItem(selectedId,selectedId2) {
                                                    document.all.myForm.selectedId.value=selectedId;
        document.all.myForm.selectedId2.value=selectedId2;
        document.all.myForm.submit();
        }


Problem confirmed and fixed, fix will be available as part of next version (1.5)