Author Topic: Selection Rows + Remote Paging - Persistence  (Read 2462 times)

Webauthor

  • Pro OEM
  • Jr. Member
  • *
  • Posts: 51
    • View Profile
Selection Rows + Remote Paging - Persistence
« 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?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Selection Rows + Remote Paging - Persistence
« Reply #1 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.