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

Open hierarchy on Select

0 Answers 136 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 05 Apr 2012, 03:10 PM
This is not so much a question as it is a quick tip to help those with similar needs.

I want to open a row's detail simply by clicking a selection, as opposed to having to click on the arrow cell. As part of the kendoGrid initialization, I added the following code:
,   change         : function() {
        var grid = this;
 
        grid.select().each(function() {
            grid.collapseRow(grid.tbody.find("tr.k-master-row"));
            grid.expandRow(grid.tbody.find("tr.k-state-selected"));
        });
    }

This will first close all open detail rows, then open the one you've selected.

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Mike
Top achievements
Rank 1
Share this question
or