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

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

1 Answer 280 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sanjay
Top achievements
Rank 1
Sanjay asked on 28 Jul 2016, 06:27 AM

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

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 29 Jul 2016, 08:36 AM

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.
 
Tags
Grid
Asked by
Sanjay
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or