GridView.GetRelationIndex(Int32, String) Method
Gets the index of the specified relationship for the specified master row.
Namespace: DevExpress.XtraGrid.Views.Grid
Assembly: DevExpress.XtraGrid.v24.2.dll
NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
row |
Int32 | An integer value specifying the master row handle. |
relation |
String | A string identifying the name of the required relationship. |
#Returns
Type | Description |
---|---|
Int32 | An integer representing the zero-based index of the specified relationship; -999999 if a relationship with the specified name is not found. |
#Remarks
The number of relations for a particular row is determined by the GridView.GetRelationCount method. The GetRelationIndex method returns a value between 0 and GetRelationCount-1 and this defines the specified relationship’s index amongst the other relationships. The indexes define the order in which detail Views are displayed for particular master rows.
To get the name of a relationship by its index, the GridView.GetRelationName method can be used.
Note
Detail pattern Views do not contain data and they are never displayed within Xtra
- Grid
Control. - returns the top most View in a grid;Main View - Grid
Control. - returns the focused View;Focused View - Grid
Control. - returns the currently maximized View;Default View - the sender parameter of View specific events;
- Grid
View. - returns a detail clone View for a specific master row.Get Detail View