Categories | Question details Back To List | ||
TreeGrid I'm using treegrid split mode with the manual update mode dataprocessor. The browser is IE 7. I got JS err "childs is null or is not an object" when I delete rows that is newly inserted. Deleting rows from load XML is okay, deleted row is marked with line-through. Following is the updated sample-code : <script> var myDataProcessor; function doOnLoad(){ mygrid = new dhtmlXGridObject('gridbox'); mygrid.selMultiRows = true; mygrid.imgURL = "../../../dhtmlxGrid/codebase/imgs/icons_books/"; mygrid.setHeader("Tree,Price,Note"); mygrid.setInitWidths("200,100,100") mygrid.setColAlign("left,right,center") mygrid.setColTypes("tree,price,ch"); mygrid.setColSorting("str,str,str") mygrid.init(); mygrid.enableSmartRendering(true); mygrid.splitAt(1); mygrid.loadXML("../common/treegrid_sample_07_split.xml"); myDataProcessor = new dataProcessor("test.do?mode=updateAll"); myDataProcessor.setTransactionMode("POST", true); // All Transaction Mode.. myDataProcessor.enableDataNames(true); myDataProcessor.setUpdateMode("off"); myDataProcessor.init(mygrid); } function save() { myDataProcessor.sendData(); } </script> <div id="gridbox" width="400px" height="250px" style="background-color:white;"></div> <table> <tr><td> <div><a href="#" onclick="mygrid.addRow((new Date()).valueOf(),['new row','text','text',1,0],0)">Add new row</a></div> <div><a href="#" onclick="var z=mygrid.getRowId(this.nextSibling.value); if (z) mygrid.addRow((new Date()).valueOf(),['new row','text','text',1,1],0,z)">Add new row at child of node at position</a><input></div> <div><a href="#" onclick="var z=mygrid.getSelectedId(); if (z) mygrid.addRow((new Date()).valueOf(),['new row','text','text',1,1],0,z)">Add new row as child of selected</a></div> <div> </div> <div><a href="#" onclick="var z=mygrid.getRowId(this.nextSibling.value); if (z) mygrid.deleteRow(z)">Delete row at position</a><input></div> <div><a href="#" onclick="mygrid.deleteSelectedItem()">Delete selected rows</a></div> </td> </tr> <tr><td width="50"><div> </div><div><a href="javascript:void(0);" onclick="save();">Save</a></div></td></tr> </table> </div> Answer posted by dhxSupport on Oct 19, 2009 07:53 Unforutnately we cannot reproduce this issue locally. What version of dhtmlxGrid do you use? Answer posted by Chung on Oct 20, 2009 00:34 Hi, The version of the dhtmlxTreeGrid is v2.5 build 090904. Could you test add/delete rows in TreeGrid using SplitAt function and the manual DataProcessor mode ? Following is dataprocessor_debug log: Thnaks in advance. |