Back to Devexpress

GridView.SetMasterRowExpanded(Int32, String, Boolean) Method

windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-gridview-dot-setmasterrowexpanded-x28-system-dot-int32-system-dot-string-system-dot-boolean-x29.md

latest4.9 KB
Original Source

GridView.SetMasterRowExpanded(Int32, String, Boolean) Method

Opens or closes a master row’s detail View identified by the relationship’s name.

Namespace : DevExpress.XtraGrid.Views.Grid

Assembly : DevExpress.XtraGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

csharp
public void SetMasterRowExpanded(
    int rowHandle,
    string relationName,
    bool expand
)
vb
Public Sub SetMasterRowExpanded(
    rowHandle As Integer,
    relationName As String,
    expand As Boolean
)

Parameters

NameTypeDescription
rowHandleInt32

An integer value identifying the master row by its handle.

| | relationName | String |

A string representing the required relationship’s name.

| | expand | Boolean |

true to open the specified detail; false to hide it.

|

Remarks

This overload opens or hides a specific detail View which is identified by the name of the relationship it displays. To open or hide a detail View by its index amongst the other details, the GridView.SetMasterRowExpandedEx method can be used. The SetMasterRowExpanded and GridView.SetMasterRowExpandedEx methods are equivalent and differ only in the second parameter which identifies the required detail View. See the GridView.SetMasterRowExpandedEx topic for more information.

Note

Detail pattern Views do not contain data and they are never displayed within XtraGrid. So, the SetMasterRowExpanded member must not be invoked for these Views. The SetMasterRowExpanded 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

CollapseMasterRow

ExpandMasterRow

GetDetailView(Int32, Int32)

GetVisibleDetailView(Int32)

IsMasterRow(Int32)

MasterRowCollapsed

MasterRowCollapsing

MasterRowExpanded

MasterRowExpanding

SetMasterRowExpandedEx(Int32, Int32, Boolean)

Master-Detail Relationships

GridView Class

GridView Members

DevExpress.XtraGrid.Views.Grid Namespace