Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by CHW on Jun 01, 2008 12:31
open dhtmlx forum
colspan and rowspan in dhtmlxGrid

Hi,

Problems with colspan and rowspan in dhtmlxGrid.

In version previous the dhtmlxSuite_pro_2008Rel2_80512 - dhtmlxGrid - using dhtmlXGridFromTable
When I have ROWSPAN = big number (sample="80") - > Everything works.
In version dhtmlxSuite_pro_2008Rel2_80512 - dhtmlxGrid - don't work!!!


The same problem happens with the current version and previous with XML.
rowspan= big number (sample="80")
When I use mygrid.enableSmartRendering(true);


Using dhtmlXGridFromTable, if I remove of the new version the -> onbeforeinit = " mygrid. enableSmartRendering(true); "
and to use the dhtmlxgrid_start.js of the previous version. He almost works correctly, except mygrid.setRowHidden(mygrid.getRowId(0),true);


I believe that code problem exists, when it is used smart render.


Best regards.

CHW
Answer posted by Support on Jun 02, 2008 02:49
>>When I use mygrid.enableSmartRendering(true);
The rowspans will not work in smart rendering mode ( they hardly usable in paging mode as well ), in case of dynamic rendering mode, grid render only parts of dataset, while to render rowspan correctly - all involved rows must be rendered at once.

>>When I have ROWSPAN = big number (sample="80") - > Everything works.
Basically it was a not supported side effect in previous version
Previous version not supported rowspans and colspans, while loading data from HTML table, but it reused rows of HTML table which result in correct visual rendering, but many API calls against such rows may cause JS error.
Answer posted by CHW on Jun 02, 2008 13:36

Hi,

Thanks,

But,

There is some sorts things out of altering the number of rows to each load (smart render)?

For sample:

First load : enableSmartRendering(true,50) -> load 50 rows
Second load: enableSmartRendering(true,82) -> load 82 rows
....

How can I make this?

 It is possible to use the event onXLS for to alter the number of rows?

I can use the event onXLS with dhtmlXGridFromTable?

Best regards,

CHW

Answer posted by Support on Jun 03, 2008 01:53
If you load all data at once ( as single XML, without dynamical loading) - you may skip the second parameter at all , just use
    grid.enableSmartRendering(true)
and grid will autodetect the count of rows in XML and set the size accordingly.

The second approach is to use rows@total_count attribute, you can still use enableSmartRendering without additional parameters, but specify count of rows directly in XML.
    grid.enableSmartRendering(true);
in xml
    <rows total_count="50">
       ... data here...
    </rows>

>> It is possible to use the event onXLS for to alter the number of rows?
While it possible to change the size of buffer by js commands, its pretty complex way. The two solutions, described above, are preferable.

>>I can use the event onXLS with dhtmlXGridFromTable?
When grid loaded from HTML table it not generates any additional events ( it a sync. process, so it not necessary to wait while data loaded )
It possible to defined custom code, which will be called on tree-to-grid conversion through oninit and onbeforeinit attributes of source table.

http://www.dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Init_from_HTML.html#grid_art_inithtml