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

Check if row is already selected

1 Answer 1741 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Seyfor
Top achievements
Rank 1
Seyfor asked on 27 Jul 2016, 05:49 AM
I iterate through grid.items(). How can I check if items[i] is selected. Is it safe to check aria-selected attribute on tr when options.selectable is row or aria-selected attribute on td when options.selectable is cell?

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimiter Topalov
Telerik team
answered on 28 Jul 2016, 03:09 PM
Hello Matjaž,

You can get the selected rows or cells via the Grid's select() method:

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#methods-select

You can also check whether an item is selected by checking against the '.k-state-selected' class (as the select() method does internally):

http://dojo.telerik.com/OroLe

I hope this helps.

Regards,
Dimiter Topalov
Telerik by Progress
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Tags
Grid
Asked by
Seyfor
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Share this question
or