Select rows programmatically across multiple pages

Dear support team,
I have a grid with all records are loaded once to data source and use pagination with "persistSelection" mode.
I can select multiple rows across multiple pages manually without problem.
But when to set selection rows programmatically with  the "selectRows" function, only rows in current pages is selected. When I switch to other pages no rows are selected.
So Is there a way to set the selections programmatically across multiple pages? Or I need to use databound callback to set selection each time I change the page?

Thanks in advance.

1 Reply 1 reply marked as answer

AG Ajith Govarthan Syncfusion Team April 6, 2021 05:33 AM UTC

Hi Ricardo, 

Thanks for contacting Syncfusion support. 

Query: So Is there a way to set the selections programmatically across multiple pages? Or I need to use databound callback to set selection each time I change the page? 
 
By default, in our EJ2 Grid the selectRows method will select the current page records only, because the next page records and the row elements will be generated only if you move to the next page and we are not sure about the total available records count and row index values. So, you can select the current page records only when you enable the pagination in the Grid component. Which is the default behavior of our EJ2 Grid. 

Regards, 
Ajith G. 


Marked as answer
Loader.
Up arrow icon