Categories | Question details Back To List | ||
Row is null in dhtmlxtreegrid Hi, I have a grid where the 2nd column is of type Tree. I am setting the rowspan for the first column based on the number of rows added to the tree. When I do that, I get an error saying 'Object Required' in IE and 'row is null' in Firefox. Dont know the reason. Help me with this. Thank you. Answer posted by Support on Sep 01, 2008 05:43 Please provide any kind of sample where error can be reconstructed. ( you can send it directly to support@dhtmlx.com ) Answer posted by Madhu on Sep 01, 2008 06:21 Hi, Thanx for the reply. Here is the piece of code, <script> mygrid = new dhtmlXGridObject('gridbox'); mygrid.selMultiRows = false; mygrid.imgURL = "appName/images/"; mygrid.setHeader('Period,Unit,Date'); mygrid.setInitWidthsP("15,*,10"); mygrid.setSkin("light"); mygrid.setColTypes("ro,tree,ro,ro"); mygrid.setColAlign("center,left,left,left"); mygrid.setColVAlign("middle,middle,middle,middle"); mygrid.setColSorting("na,na,na,na"); mygrid.enableColSpan(true); mygrid.enableTreeGridLines(true); mygrid.enableColumnAutoSize(false); mygrid.init(); var arrMainData = new Array(); arrMainData[0] = 'Period 0'; arrMainData[1] = 'Unit 0'; arrMainData[2] = 'Date 0'; mygrid.addRow('0_M',arrMainData,0,0,'blank_1.gif'); arrMainData = new Array(); arrMainData[0] = 'Period 0'; arrMainData[1] = 'Unit 1'; arrMainData[2] = 'Date 1'; mygrid.addRow('1_M',arrMainData,1,0,'blank_1.gif'); var arrSubData = new Array(); arrSubData[0] = ''; arrSubData[1] = 'Week 0'; arrSubData[2] = 'Date 0'; mygrid.addRow('2_S',arrSubData,2,'0_M','blank_1.gif'); arrSubData = new Array(); arrSubData[0] = ''; arrSubData[1] = 'Week 1'; arrSubData[2] = 'Date 1'; mygrid.addRow('3_S',arrSubData,3,'0_M','blank_1.gif'); arrSubData = new Array(); arrSubData[0] = ''; arrSubData[1] = 'Week 0'; arrSubData[2] = 'Date 0'; mygrid.addRow('4_S',arrSubData,4,'1_M','blank_1.gif'); arrSubData = new Array(); arrSubData[0] = ''; arrSubData[1] = 'Week 1'; arrSubData[2] = 'Date 1'; mygrid.addRow('5_S',arrSubData,5,'1_M','blank_1.gif'); mygrid.setRowspan('0_M',0,6); // <-- Problem here </script> In the last line of the code, if I remove the setRowspan, then it is perfectly working fine. Problem occurs both in IE and Firefox. Please provide a fix for this. Madhu Answer posted by Support on Sep 01, 2008 09:27 Rowspan can't be used against different levels of hierarchy as in your case. In you code you creating rowspan, including parent and child items - which is not possible. |