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

[Solved] Master/Detail with Row Selection

2 Answers 191 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jeff Buechler
Top achievements
Rank 1
Jeff Buechler asked on 15 Nov 2010, 07:42 PM
How can I get the row index of a row in the master grid? Before adding the detail grid, I could use e.row.rowIndex in the OnRowSelect handler. With the detail grid added, the rowIndex changes depending on whether or not details have been expaned. For example, I have a master grid with two rows. Before expanding any details the e.row.rowIndex contains 1 for the second row. After the first row is expanded (even if it is later colapsed) e.row.rowIndex contains 2. Grid.data still has just two rows 0 and 1. I need to get some values off hidden columns in the grid for the selected row. Is there any way to do that with a master/detail grid?

2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 16 Nov 2010, 07:58 AM
Hello Jeff Buechler,

 You can try something like this:

var grid = $('#Grid').data('tGrid')

var index = grid.$tbody.find('>.t-master-row').index(e.row);

Regards,
Atanas Korchev
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Jeff Buechler
Top achievements
Rank 1
answered on 16 Nov 2010, 02:30 PM
Thanks! That works.
Tags
Grid
Asked by
Jeff Buechler
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Jeff Buechler
Top achievements
Rank 1
Share this question
or