GridView.GetVisibleDetailRelationIndex(Int32) Method
Determines which of the master row’s details is currently visible.
Namespace: DevExpress.XtraGrid.Views.Grid
Assembly: DevExpress.XtraGrid.v19.1.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
rowHandle | Int32 | An integer value specifying the master row’s handle. |
Returns
Type | Description |
---|---|
Int32 | A zero-based integer identifying the opened detail. -1 if the master row is collapsed (i.e. none of the detail Views are visible). |
Remarks
You can expand a master row and make a particular detail visible using the GridView.SetMasterRowExpandedEx method. If you need to access the currently visible detail, use the GridView.GetVisibleDetailView method. To obtain arbitrary details, use the GridView.GetDetailView method instead.
Please refer to the Master-Detail Relationships and Working with Master-Detail Relationships in Code topics for additional information.
Note
Detail pattern Views do not contain data and they are never displayed within XtraGrid. So, the GetVisibleDetailRelationIndex member must not be invoked for these Views. The GetVisibleDetailRelationIndex member can only be used with real Views that are displayed within the Grid Control. The real Views with which an end-user interacts at runtime can be accessed using the following methods.
- GridControl.MainView - returns the top most View in a grid;
- GridControl.FocusedView - returns the focused View;
- GridControl.DefaultView - returns the currently maximized View;
- the sender parameter of View specific events;
- GridView.GetDetailView - returns a detail clone View for a specific master row.