Selected items deselected on pagination

Hi,

In the default data grid implementation, if you select items on a page, then move to another page, the items from the first page are deselected.

Is there a simple way to retain those selections, so a user could go from page to page, building up selected items from multiple pages?


3 Replies

SK Sujith Kumar Rajkumar Syncfusion Team November 16, 2021 06:13 AM UTC

Hi Tom, 
 
Greetings from Syncfusion support. 
 
Based on the query we could understand that your requirement is to persist the row selection while performing sorting action in the Grid. This can be achieved by enabling the persistSelection property of the Grid’s selectionSettings. For persisting selection on the Grid, any one of the column should be defined as a primary key using columns.isPrimaryKey property and a checkbox type column needs to be defined. 
 
We have prepared a sample based on this for your reference. You can find it below, 
 
 
 
Please get back to us if you require any further assistance. 
 
Regards, 
Sujith R 



TM Tom McNeer November 16, 2021 04:44 PM UTC

Thanks very much. This is exactly what I was looking for



SK Sujith Kumar Rajkumar Syncfusion Team November 17, 2021 06:03 AM UTC

Hi Tom, 
 
You’re welcome. We are glad to hear that your query has been resolved. 
 
Regards, 
Sujith R 


Loader.
Up arrow icon