Check all child rows when parent row is checked in Hierarchical Grid

2 posts, 0 answers
  1. Sanjay
    Sanjay avatar
    10 posts
    Member since:
    Nov 2015

    Posted 28 Jul Link to this post

    Hi,

     

    I am using Hierarchical Grid with checkbox. I want to check all child records when parent row.

    From parent Grid, I got checked employeeID and then retrieving the child grid.

           var childGrid= $("#childGrid"+employeeID).data("kendoGrid");
           var checkboxItems=childGrid.items().filter(":has(input:checkbox)");

           $(checkboxItems).prop('checked',"checked");

     

    But its not working. Appreciate any help.

     

    Regards,

    Sanjay

  2. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2159 posts

    Posted 29 Jul Link to this post

    Hello Sanjay,

    The above code filters the rows that have checkboxes in them, but the checkboxItems collections still holds to rows (not the checkboxes). You should retrieve the checkbox elements inside the rows and then set the checked property.

    Regards,
    Dimiter Madjarov
    Telerik by Progress
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
  3. Kendo UI is VS 2017 Ready
Back to Top