Skip to main content

GridControl.ExpandMasterRow(Int32, DetailDescriptorBase) Method

Expands the specified master row and, optionally, shows the specified Detail.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v14.2.dll

#Declaration

public void ExpandMasterRow(
    int rowHandle,
    DetailDescriptorBase descriptor = null
)

#Parameters

Name Type Description
rowHandle Int32

An integer value specifying the master row by its handle. If the specified row handle is invalid, the method does nothing.

#Optional Parameters

Name Type Default Description
descriptor DetailDescriptorBase

null

Optional. A DetailDescriptorBaseobject specifying the detail to be shown. If the specified object doesn't represent the specified row's detail, the method expands the first or previously visible detail, depending on whether the current row was previously expanded.

#Remarks

Use this method to expand rows or switch between active Details via code. This might be useful if you want to implement custom controls that manipulate Detail views and hide default expand buttons by disabling the TableView.ShowDetailButtons option.

The ExpandMasterRow method will not have any effect if overridden by the GridControl.MasterRowExpanding event handler.

You can also expand or collapse master rows using the GridControl.CollapseMasterRow and GridControl.SetMasterRowExpanded methods. To determine the expanded state of a row and the currently visible detail, use the GridControl.MasterRowExpanded and GridControl.GetVisibleDetail members.

See Also