Dear,
We have implemented the server-side pagination on the pqGrid.
We are facing some issues while filtering the data.
Suppose the user chooses one row and filters the grid, due to the server-side functionality, the grid is refreshed and after the removal of the filter, the selection is removed.
We have applied the following code. It perfectly works in the case of the first filter, but if the user filters the data twice or more the selection is removed.
beforeFilter: function(){
var grid = this,
selected = grid.SelectRow().getSelection().map(function(obj){
return obj.rowData.customerid;
});
this.one('complete', function(){
grid.SelectRow().add({
rows: grid.getData().filter(function(rd){
return selected.indexOf( rd.customerid ) >= 0 ;
}).map(function(rd){
return {rowIndx: rd.pq_ri};
})
});
});
},
Kindly check and provide the solution/way to solve this.