Check if row is already selected

2 posts, 1 answers
  1. Matjaž
    Matjaž avatar
    74 posts
    Member since:
    Jul 2015

    Posted 27 Jul Link to this post

    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?
  2. Answer
    Dimiter Topalov
    Dimiter Topalov avatar
    313 posts

    Posted 28 Jul Link to this post

    Hello Matjaž,

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

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

    I hope this helps.

    Dimiter Topalov
    Telerik by Progress
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Back to Top