This is a migrated thread and some comments may be shown as answers.

Supported way to clear selection on all pages

1 Answer 436 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mikael
Top achievements
Rank 1
Mikael asked on 12 Apr 2021, 09:07 AM

This article: https://docs.telerik.com/kendo-ui/knowledge-base/clear-selection-all-pages-grid

uses the undocumented property _selectedIds. If would prefer using a documented way, and since the article is rather old, maybe there is one today?

 

 

1 Answer, 1 is accepted

Sort by
0
Tsvetomir
Telerik team
answered on 15 Apr 2021, 07:38 AM

Hi Fredrik,

When the Kendo UI Grid is set up for persistence of the selection across all pages, the only way to delete the selection on all rows is to modify the internal collection that holds the selected IDs. 

This is due to the fact that the clearSelection() or any DOM manipulations will clear the selection only on the current page.

The alternative would be to modify the pageSize of the grid to accommodate all rows, call the clearSelection() method and return back the old pageSize.

 

Regards,
Tsvetomir
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Grid
Asked by
Mikael
Top achievements
Rank 1
Answers by
Tsvetomir
Telerik team
Share this question
or