splitAt

HI,



I didn’t get to use splitAt.



I use dhtmlXGridFromTable.



In his last suggestion:

In dhtmlxgrid_start.js you can locate and update



windowf.init();

with

windowf.init();

windowf.splitAt(1);



But it doesn’t work!



My code:

mygrid = dhtmlXGridFromTable(‘gridbox’);

’ My new header (multilines)

mygrid.attachHeader(“Category,Country,City,2001,#cspan,2002,#cspan,Total - net sales”);

mygrid.attachHeader("#rspan,#rspan,#rspan,Gross sales,Discount,Gross sales,Discount,#rspan");

’ Disabled rows - Old headers

mygrid.setRowHidden(mygrid.getRowId(0),true);

mygrid.setRowHidden(mygrid.getRowId(1),true);



I know that the first row in the Table will be the header (dhtmlXGridFromTable), but I should hide her.





Some idea to solve my problem?



Best regards,



CHW

mygrid.setRowHidden
This command will hide the first row of dataset, not the first row of header

>>But it doesn’t work!

Please check attached sample, it uses the same approach and works correctly. To simplify usage dhtmlxgrid_start.js was modified to take split position from split attribute of table.

sample.zip (837 Bytes)
dhtmlxgrid_start.zip (1.72 KB)


Hi,



Thank you for his answer and example.



But to observe the values of the cells before and after the conversion. (Click on button)



1) In header Category and Country don’t show.
mygrid.attachHeader(“Category,Country,City,2001,#cspan,2002,#cspan,Total - net sales”);
2) In detail, values in incorrect columns.
 
I made few alterations to get better:
 <table id=“gridbox” split=“3” style=“width:400px” imgpath="…/…/codebase/imgs/" border=“1” >
  


   Category
   Country
   City
   Column 4
   Column 5
   Column 6
   Column 7
   Column 8
  
   …
 function doIt () {
  mygrid = dhtmlXGridFromTable(‘gridbox’);
  mygrid.attachHeader(“Category,Country,City,2001,#cspan,2002,#cspan,Total - net sales”);
  mygrid.attachHeader("#rspan,#rspan,#rspan,Gross sales,Discount,Gross sales,Discount,#rspan");
  
  mygrid.setRowHidden(mygrid.getRowId(0),true);
  mygrid.setRowHidden(mygrid.getRowId(1),true);



  mygrid.hdr.deleteRow(1); // delete the first row in header



 }



Best regards,



CHW