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

Hierarchical grid with checkbox

2 Answers 513 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Naga
Top achievements
Rank 1
Naga asked on 03 Aug 2017, 07:31 PM

Hi 

I have a kendo hierarchical grid

within the detail grid i have a checkbox column. How do i get the dataitem when the checkbox of detail grid is checked ? 

in the below code I want to fire a click event on the checkbox and get all data using dataItem
please help.

here is my code snippet of detail grid (inner grid)

$('<div />').appendTo(e.detailCell).kendoGrid({

dataSource: {},

schema: {},

columns: [
            {
                template: "<input type='checkbox' class='chkTransferAsstReq' id='chkSelectAssetMove'/>", width: '30px'
            },

other columns 1,

other columns 2,

]

})

2 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 07 Aug 2017, 10:08 AM
Hello Naga,

The desired result can be achieved by attaching a click event handler to the checkbox. Then using a jQuery to find the current tr element and the current child Grid instance. Once both elements are selected I can suggest using the dataItem:

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

I made an example demonstrating this:

http://dojo.telerik.com/eGIHUD/2

I hope this is helpful.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Naga
Top achievements
Rank 1
answered on 07 Aug 2017, 05:51 PM
Thank you Stefan, this is exactly what I was looking for.
Tags
Grid
Asked by
Naga
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Naga
Top achievements
Rank 1
Share this question
or