Select all rows progammatically

Is there a way to select all rows programmatically? I dont want to use the checkboxes.


3 Replies

RR Rajapandi Ravi Syncfusion Team April 15, 2022 09:28 AM UTC

Hi Sebastian,


Greetings from Syncfusion support


You can select the Grid rows programmatically by using selectRows() method of Grid. 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.


API: https://ej2.syncfusion.com/documentation/api/grid/#selectrows


Regards,

Rajapandi R




SG Sebastian Göhring replied to Rajapandi Ravi April 15, 2022 11:50 AM UTC

Sadly i cannot use select rows since Im using virtual scroll. Is there a possiblity to achieve this still?



PS Pavithra Subramaniyam Syncfusion Team April 18, 2022 02:01 PM UTC

Hi Sebastian,


Unfortunately, the programmatic selection is not supported by the Virtual scrolling feature. So, We could not select all the rows in a virtual scroll Grid.
Please refer to the below documentation link for more limitations of Virtual scrolling.


https://ej2.syncfusion.com/javascript/documentation/grid/virtual/#limitations-for-virtual-scrolling


Regards,

Pavithra S


Loader.
Up arrow icon