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

Grid Hierarchy, expand mode single

1 Answer 225 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 06 Aug 2012, 09:59 PM
Similar to the PanelBar, I require that only one row entry hierarchy stays open at a time, in particular, when a row is in edit mode.

It is insufficient to bind a "open/close this row" to update and edit because it does not handle the case where the user edits another row or clicks cancel.

I've tried everything but nothing works. Help!

1 Answer, 1 is accepted

Sort by
0
Phil
Top achievements
Rank 1
answered on 18 Oct 2012, 11:21 PM
I needed something similar, so I threw a little bit of jQuery at the problem which addressed my needs. My grid allows only single row selection and only one hierarchy opened at a time.



change: function () {

                this.collapseRow(this.tbody.find(":not(tr.k-state-selected)"));

            },



Try out that line in your change event handler, which basically collapses the row of all rows that are not selected.
Tags
Grid
Asked by
Matt
Top achievements
Rank 1
Answers by
Phil
Top achievements
Rank 1
Share this question
or