Getting name of sub grid in hierarchy to use in JS

3 posts, 1 answers
  1. Kevin
    Kevin avatar
    4 posts
    Member since:
    Dec 2015

    Posted 19 Jan 2016 Link to this post

    I have implemented a hierarchy grid, and I would like to implement an event to launch a kendowindow on doubleclick of the subgrid.


    Since the grid is named dynamically "grid_[ID OF ITEM]" I am not sure how to grab the row in script like I would if I knew the grid name.

    $('#grid_#=CustomerCode# table tr').live('dblclick', function () {
               // code

    does not work,and I assume because I cant shove that type of name into JS as it is an asp element. How would I write that query correctly?

  2. Answer
    Nikolay Rusev
    Nikolay Rusev avatar
    2287 posts

    Posted 21 Jan 2016 Link to this post

    Hello Kevin,


    You can handle detailInit event of the master Grid. And inside that event you can find the detail grid.




    function detailInit(e) { 

     var detailGridElement = e.detailCell.find("[data-role=grid]");

     var detailGrid ="kendoGrid");



    Nikolay Rusev
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Kevin
    Kevin avatar
    4 posts
    Member since:
    Dec 2015

    Posted 21 Jan 2016 in reply to Nikolay Rusev Link to this post

    Thanks Nikolay - That worked like a charm.

Back to Top