In Excel only the rows loaded into the grid are visible and not the complete data (all the rows) with virtual scrolling. How can I export the complete data and not only the rows loaded into the grid?
I found a way, but it's not what I want: First I click on the reload button to load 1000000 rows at once.
When I click onto the Excel Export all the rows are displayed.
So I try to the same method without clicking the Reload button before Excel Export, but that doesn't work.
Only the loaded rows are also displayed in the Excel, because the Export starts immediately before the grid was reloaded.
Is there a way to add an event to refreshDataAndView so that the Excel Export can only start after the refresh.
Or is there a better method for Excel Export with remote data and virtual scrolling?
Here is the actual code:
var obj = {
toolbar: {
cls: 'pq-toolbar-export',
items: [{
type: 'button',
label: 'Reload',
icon: 'ui-icon-arrowrefresh-1-e',
listeners: [{
"click": function (evt) {
pqVS.rpp=1000000;
$grid.pqGrid('refreshDataAndView');
}
}]
},
{
type: 'button',
label: 'Excel Export',
icon: 'ui-icon-document',
listeners: [{
"click": function (evt) {
pqVS.rpp=1000000;
$grid.pqGrid('refreshDataAndView');
$("#grid_php").pqGrid("exportExcel", { url: "export_xls.php", sheetName: "pqGrid sheet", filename: "TEST" });
}
}]
}
]
}