Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Joan Lao on Aug 18, 2009 12:30
open dhtmlx forum
DHTMLX grid.printView()

I would like to confirm if we use the grid.printView option it will display the current records displayed in the grid. Example I have 30 records in total for my query, my pagination is set to dispaly 10 records. If I invoke the dhtmlx grid printView(), it will only show me the printable version for the 10 records on the page where I am at and not the 30 records. Is this correct?
Answer posted by Support on Aug 19, 2009 02:42
If you are using statical loading - print view will show all rows in grid 
If you are using dyn. loading - print view will not be able to show rows which is not loaded yet. 

In some older versions, there was an issue with print view and paging. 
You can try to change your code in the next way

for (var i=0; i<grid.getRowsNum(); i++) grid.render_row(i); //prerender all rows in grid
grid.printView();