How to load all rows in SmartRendering?

How to load all rows in SmartRendering mode?



I would like to call this function before PrintView to have complete set of data on print

mygrid.forEachRow(function(id){
mygrid.getRowById(id)
});

By the way, dhtmlxgrid 2.0 must generate correct PrintView in srnd mode without additional steps

I try this way:
function print(){    
    mygrid.forEachRow(function(id){
       mygrid.getRowById(id);      
    });
    mygrid.printView();
}

And no difference: only prints visible rows
When alert(id) added to iteration it only shows id of visible rows

Im using dhtmlxgrid 2.0, my grid configuration is:

mygrid.enableAutoHeight(true,250,true);   
mygrid.init();
mygrid.enableSmartRendering(true);   

Are you using grid in static smart rendering or in dynamic smart rendering mode ( all data loaded at once or by chunks )?
In case of dyn. loading - there is no way to force loading of all not loaded yet data.
In first case, please try use slightly different approach.

function print(){
for (var i=0; i<mygrid.getRowsNum(); i++)
mygrid.render_row(i);
mygrid.printView();
}

Still no luck, works same way showing only rows visible on page.

Im using SmartRendering not DynamicLoading, in my grid file I have complete set of records.
When I scroll down to show all rows and call PrintView - only then I have complete set of rows.

Please contact us directly at support@dhtmlx.com if you need a workind sample of such functionality.

Hi there,
funny, I’m facing exactly the same problem here today.
If I “filter” the data, it often works, if there are more not too much entries in the table. However, it’s a little bit buggy, sometimes it works and all entries are shown, sometimes not. Maybe its depending on the number of items shown / filtered ? Furthermore, if I dont filter my data, the printView() does not work at all. Nothing happens when clicking. I’m also using static smartrendering.
Any idea how to solve this ?
Thanks,
ragsna


>>funny, I’m facing exactly the same problem here today.
Be sure that you are using static smart rendering , and all data loaded at once. Same as print-view, filtering will not work if you are using dynamic smart rendering and loading data to client side by chunks.
Which version of grid you are using? Before dhtmlxgrid 2.0 printView worked only for rendered rows.



If you have such problems with dhtmlxgrid 2.0 - please provide any kind of sample or demo link , where issue can be reconstructed ( you can send such info directly to support@dhtmlx.com )

I received fix (dhtmlxgrid_nxml.js) from support that solved my problem

dhtmlxgrid_nxml.js.zip (4.52 KB)

Provided file is original version from dhtmlxgrid 2.0 package, it mostly compatible with 1.6 version and can be used with it to allow operations in SRND mode