mendenaresh1357 - Sunday, April 18, 2010 9:40 AM:
Hi Everyone,
when i select a row / Item in the Relationship grid
1) I need to get current Tab Id/Name
2) I need to get the selected item Id and Selected row Number of the grid.
How can i get these values?
Thanks,
Naresh.
RobMcAveney - Friday, April 23, 2010 12:35 PM:
I assume you're running this code on an OnSelectRow Grid Event (defined on the RelationshipType). If so, you can get the tab ID and label like this:
var tabControl = parent.relTabbar;
var tabID = tabControl.GetSelectedTab();
var tabLabel =tabControl.GetTabLabel(tabID);
The ID of the selected relationship should come into your method as a local variable named relationshipID. There is also a local named gridApplet that gives you a pointer to the grid control. To get the relative position of the row on the grid, use:
var position = gridApplet.getRowIndex(relationshipID);
See the API reference (Help -> API Reference) for more info on the controls API.