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

Kendo UI Angular Grid selection all indicator in onSelectionChange event

2 Answers 285 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Steffen
Top achievements
Rank 1
Steffen asked on 08 Apr 2021, 07:15 AM
My setting is that i use virtual scrolling in grid with selection. My problem is I will select all entries not only the first page of virtual scrolling. But the event parameter of onSelectionChange had no indicator for selection all click. When noting is selection this example works:
public onSelectionChange(event: SelectionEvent) {
    if (event.selectedCells.length === this.pageSize) {
      // selected all click?
        this.selectedKeys= this.data.map(data => data.id);
    }
    if (event.deselectedCells.length === this.variableDataService.pageSize) {
      // selected nothing click?
        this.selectedKeys= [];
    }

2 Answers, 1 is accepted

Sort by
0
Steffen
Top achievements
Rank 1
answered on 08 Apr 2021, 09:15 AM
https://stackblitz.com/edit/kendo-ui-grid-tkqu53?file=app/app.component.ts
0
Accepted
Martin
Telerik team
answered on 09 Apr 2021, 02:08 PM

Hello Steffen,

For more details on how to select all rows regardless of the page size, please check the following article from our documentation:

https://www.telerik.com/kendo-angular-ui/components/grid/selection/persisting/#toc-selecting-all-items

Here is an example with virtual scrolled Grid:

https://stackblitz.com/edit/angular-ivd5rd?file=app/app.component.ts

Regards,
Martin
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
Steffen
Top achievements
Rank 1
Answers by
Steffen
Top achievements
Rank 1
Martin
Telerik team
Share this question
or