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

[Solved] Angular-Kendo Grid - Select all rows

1 Answer 278 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 21 Nov 2014, 05:37 AM
I need to have buttons that will select all / unselect all rows in a Angular-Kendo Grid.
Is this possible? I have searched and have not come up with an answer.

any help is greatly appreciated.
thanks,
Richard

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 24 Nov 2014, 04:08 PM
Hi Richard,

Thank you for contacting us.

Selecting an item is basically attaching a class. To select all rows you may use the following code:
var grid = $("#grid").getKendoGrid();
grid.items().addClass("k-state-selected");

To remove the selection:
var grid = $("#grid").getKendoGrid();
grid.items().removeClass("k-state-selected");

I hope this information will help.

Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Richard
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or