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

[Solved] Self Referencing Hiearchy - to get the Child row rowindex in rowdouble_click .

1 Answer 96 Views
Grid
This is a migrated thread and some comments may be shown as answers.
VEDA VIDVA NARAYANAN SATTANATHAN
Top achievements
Rank 1
VEDA VIDVA NARAYANAN SATTANATHAN asked on 17 Jun 2009, 02:45 PM

 

I am using the RadGrid in which we are using the self referencing hierarchy.
In the we are opening a new page in the row_doubleClick Event of the Grid.

 
var MasterTable = grid.get_masterTableView();
var row = MasterTable.get_dataItems()[dataItem.rowIndex-1];

Please find the above code which returns the row index.
It returns for the MasterTable but if i double click the child event iam not able to get the respective event.
Please provide me solution in so that i can get the row index of the child event in the self referencing hiearchy grid.

Thanks
Veda.S

 

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 18 Jun 2009, 12:28 PM
Hi VEDA VIDVA NARAYANAN SATTANATHAN,

Please note, that in your javascript, you get a reference to RadGrid's MasterTableView client object. For nested items, you should reference the item's respective GridTableView instead of the master table:

args.get_tableVie();

This will return the table view object whose the item has been double clicked. In fact, if you need to get a reference only to the item index, here is a more straightforward way:

args.get_itemIndexHierarchical();

Please note that for the master table, this method will return a single string value that can be converted to an integer. For a detail table, it will return a value of the form:

x:x_x

Meaning: first number for index of the parent item, second number for number if detail table, and third number - index of the inner data item that has been double clicked. For example, if you double click on the 3'rd item from the only detail table of the master table's 6th item, your index would be :

6:0_3

Regards,
Veli
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
VEDA VIDVA NARAYANAN SATTANATHAN
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or