Hierarchical grid with checkbox

3 posts, 1 answers
  1. Naga
    Naga avatar
    25 posts
    Member since:
    Jul 2015

    Posted 03 Aug 2017 Link to this post

    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. Answer
    Stefan
    Admin
    Stefan avatar
    3067 posts

    Posted 07 Aug 2017 Link to this post

    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.
  3. Naga
    Naga avatar
    25 posts
    Member since:
    Jul 2015

    Posted 07 Aug 2017 in reply to Stefan Link to this post

    Thank you Stefan, this is exactly what I was looking for.
Back to Top