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

How to expand the grid row

2 Answers 409 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dorian
Top achievements
Rank 1
Dorian asked on 09 Nov 2012, 04:41 PM
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 Answers, 1 is accepted

Sort by
0
Iliana Nikolova
Telerik team
answered on 14 Nov 2012, 12:59 PM
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!
0
Dorian
Top achievements
Rank 1
answered on 14 Nov 2012, 01:31 PM
Awesome solution!. Thanks for the help :)
Tags
Grid
Asked by
Dorian
Top achievements
Rank 1
Answers by
Iliana Nikolova
Telerik team
Dorian
Top achievements
Rank 1
Share this question
or