How to expand the grid row

3 posts, 0 answers
  1. Dorian
    Dorian avatar
    5 posts
    Member since:
    Aug 2012

    Posted 09 Nov 2012 Link to this post

    Hello,

    I'm using a hierarchical grids and I have a a DropDown editor for each row, I would like to expand the hierarchical grid that belongs to the row when a value of the DropDown is selected. Is that possible?

    Thanks,

  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    1863 posts
    Member since:
    Sep 2012

    Posted 14 Nov 2012 Link to this post

    Hello Dorian,

    The described functionality is not supported out of the box, however it could be easily achieved using additional code. As a possible approach I will suggest to hook up to the select event of the DropDown editor, find the closest tr Grid element and use the expandRow() method to expand the detail grid. For example: 

    function categoryDropDownEditor(container, options) {
      $('<input //.../>')
        .appendTo(container)
        .kendoDropDownList({
            //....
            select: function(e){
               var grid = $("#grid").data("kendoGrid");
               grid.expandRow(this.element.closest("tr"));
            
        });
    }

    Regards,
    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!

  3. Dorian
    Dorian avatar
    5 posts
    Member since:
    Aug 2012

    Posted 14 Nov 2012 Link to this post

    Awesome solution!. Thanks for the help :)

Back to Top