Back to Devexpress

GridView.GetMasterRowExpanded(Int32) Method

windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-gridview-dot-getmasterrowexpanded-x28-system-dot-int32-x29.md

latest3.9 KB
Original Source

GridView.GetMasterRowExpanded(Int32) Method

Indicates whether the master row is expanded.

Namespace : DevExpress.XtraGrid.Views.Grid

Assembly : DevExpress.XtraGrid.v25.2.dll

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

Declaration

csharp
public bool GetMasterRowExpanded(
    int rowHandle
)
vb
Public Function GetMasterRowExpanded(
    rowHandle As Integer
) As Boolean

Parameters

NameTypeDescription
rowHandleInt32

The handle of the required master row.

|

Returns

TypeDescription
Boolean

true , if a specific master row is expanded, otherwise, false.

|

Remarks

Note

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

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetMasterRowExpanded(Int32) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-preserve-grid-state-on-refresh/CS/RefreshHelperClass.cs#L122

csharp
for(int i = 0; i < view.DataRowCount; i++)
    if(view.GetMasterRowExpanded(i))
        list.Add(view.GetRowCellValue(i, column));

winforms-preserve-grid-state-on-refresh/VB/RefreshHelperClass.vb#L131

vb
For i As Integer = 0 To view.DataRowCount - 1
    If view.GetMasterRowExpanded(i) Then list.Add(view.GetRowCellValue(i, column))
Next

See Also

GridView Class

GridView Members

DevExpress.XtraGrid.Views.Grid Namespace