GridControl.SetMasterRowExpanded(Int32, Boolean, DetailDescriptorBase) Method
Changes the expanded state for a specified master row and, optionally, shows a specified Detail.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v14.2.dll
#Declaration
public void SetMasterRowExpanded(
int rowHandle,
bool expand,
DetailDescriptorBase descriptor = null
)
#Parameters
Name | Type | Description |
---|---|---|
row |
Int32 | An integer value specifying the master row by its handle. |
expand | Boolean | true to expand the specified row; false to collapse it. |
#Optional Parameters
Name | Type | Default | Description |
---|---|---|---|
descriptor | Detail |
null |
Optional. A Detail |
#Remarks
Use this method to expand or collapse master rows from code or switch between visible details. This might become useful if you are providing your own control for master row management while disabling the TableView.ShowDetailButtons option. Another way to use this option is when implementing custom automated detail visibility management.
This method may not expand or collapse the master row if these actions are overridden in GridControl.MasterRowExpanding and/or GridControl.MasterRowCollapsing event handers.
To determine a master row's expanded state and currently visible detail, use the GridControl.IsMasterRowExpanded and GridControl.GetVisibleDetailDescriptor (GridControl.GetVisibleDetail) methods.