windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-gridview-dot-setmasterrowexpandedex-x28-system-dot-int32-system-dot-int32-system-dot-boolean-x29.md
Opens or closes a master row’s detail.
Namespace : DevExpress.XtraGrid.Views.Grid
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
public void SetMasterRowExpandedEx(
int rowHandle,
int relationIndex,
bool expand
)
Public Sub SetMasterRowExpandedEx(
rowHandle As Integer,
relationIndex As Integer,
expand As Boolean
)
| Name | Type | Description |
|---|---|---|
| rowHandle | Int32 |
An integer value identifying the master row by its handle.
| | relationIndex | Int32 |
A zero-based integer specifying the index of the relationship in the data source. If set to -1 , the method acts like the GridView.SetMasterRowExpanded method.
| | expand | Boolean |
true to open the specified detail; false to hide it.
|
The SetMasterRowExpandedEx method’s behavior depends on the initial state of the specified master row. If the expand parameter value is true , the following results are possible:
If the expand parameter value is false , the following can occur:
When attempting to change a master row’s expanded state, the GridView.MasterRowCollapsing and GridView.MasterRowExpanding events are raised. These events’ handlers may prohibit master row expanding/collapsing.
Please refer to the Master-Detail Relationships topic for additional information.
Note
Detail pattern Views do not contain data and they are never displayed within XtraGrid. So, the SetMasterRowExpandedEx member must not be invoked for these Views. The SetMasterRowExpandedEx member can only be used with Views that display real data within the Grid Control. Use the following methods to access these Views with which an end user interacts at runtime.
See Also