ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: vijay@spinetechnologies on May 03, 2022, 12:32:15 pm
-
Hi,
We have implemented the PQ grid with the serverside pagination with a server-side filter. In the grid, we provide the checkbox column the select the records.
Now when we filter records and select the filter records, and then remove the filter, then the grid removes the selection. Is it any way to maintain the selection?
-
Please try filterModel.hideRows mode.
https://paramquery.com/pro/api#option-filterModel
-
We have implemented a server-side filter
When we try to filter the data from the search box, it postback on the event of focus out
due to which it fails to maintain the state of the grid.
the given solution hideRows option doesn’t work.
Kindly assist us on the same
-
Please add a unique field in the rows in your grid and use this code after replacing customerid by unique field name:
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};
})
});
});
},
-
Dear Paramvir,
Thanks for your solution. It resolved my query. :) :) :)