Getting name of sub grid in hierarchy to use in JS

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

    Posted 19 Jan 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
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 21 Jan 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.

     

    Example:

     

    function detailInit(e) { 

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

     var detailGrid = detailGridElement.data("kendoGrid");

    }

     

    Regards,
    Nikolay Rusev
    Telerik
    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. UI for ASP.NET MVC is VS 2017 Ready
  4. Kevin
    Kevin avatar
    3 posts
    Member since:
    Dec 2015

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

    Thanks Nikolay - That worked like a charm.

Back to Top