Categories | Question details Back To List | ||||||||
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 Answer posted by Support on Oct 23, 2008 04:20 mygrid.forEachRow(function(id){ mygrid.getRowById(id) }); By the way, dhtmlxgrid 2.0 must generate correct PrintView in srnd mode without additional steps Answer posted on Oct 23, 2008 03:12 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); Answer posted by Support on Oct 23, 2008 06:38 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(); } Answer posted on Oct 23, 2008 07:03 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. Answer posted by Support on Oct 23, 2008 07:55 Please contact us directly at support@dhtmlx.com if you need a workind sample of such functionality. Answer posted by ragsna on Oct 23, 2008 10:23 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 Answer posted by Support on Oct 24, 2008 02:10 >>funny, I'm facing exactly the same problem here today. 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 ) Answer posted on Oct 27, 2008 00:46 I received fix (dhtmlxgrid_nxml.js) from support that solved my problem Attachments (1)
Answer posted by Support on Oct 27, 2008 02:38 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 |