So that's working great, thanks again. However, after the export, the selections appear in different places because the sort shifts a bit. I noticed that when I put the sort back, the selections are in the same place, which is what I want. I have tried to get the sort model before I filter and then set it back afterwards, but I'm having trouble with this. Following is just the listener code:
listener: function () {
//getter
var sortModel = $( "#grid_json" ).pqGrid( "option", "sortModel" );
//filter the selected rows.
this.filter({
oper: 'replace',
data: [{dataIndx: 'pq_rowselect', value: true, condition: 'equal'}]
});
this.exportData({
url: "index.cfm?fuseaction=browselist.exportExcel",
format: "xlsx",
filename: "report",
render: true
});
//reset the filter.
this.filter({
oper: 'replace',
data: []
})
//setter
$( "#grid_json" ).pqGrid( "option", "sortModel", sortModel );
}
Please let me know if you can see what I'm missing.
Thanks!