ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: Webauthor on July 20, 2015, 04:36:43 am

Title: Selection Rows + Remote Paging - Persistence
Post by: Webauthor on July 20, 2015, 04:36:43 am
I have a grid with remote paging on and selection model set to row.  I'd like to be able to retain the selected rows as I page through the record set.  Is this possible to do?
Title: Re: Selection Rows + Remote Paging - Persistence
Post by: paramvir on July 20, 2015, 11:37:39 pm
Listen to beforeChange and refresh event of the pager, in the event, get the selection indices of the grid (getSelection ) and save them along with page number.

[{ pageNo: ui.curPage, selections: [rowIndx, ..] }, ...]

When you receive data from the server in dataModel.getData callback, rebuild the selections with selection add method.