I'm using the ASP.NET WebForms version of jqGrid, however I'm sure the same events should be available as the standard grid.
I have some pages with multiple grids on them, it could be just one, or could be several. I have a print button which will display 10,000 records (to display all the records on the grid), resize it to fit onto an A4 sheet, fire window.print()
and then go back to the original record count, and resize the grid back to 100%.
The missing part is to know when to fire window.print()
as I need to wait for all the grids to be loaded before doing so.
I've tried having a global var allGridsLoaded = false;
and then use the Load_Complete
event and beforePageChange
to set the var, but obviously with each grid resetting the var I'm not sure how to track them all?
In the Load_Complete
I'm thinking I could loop through each grid, but what's the cleanest way to tell if they've loaded?