Back to Devexpress

GridControl.CollapseGroupRow(Int32) Method

wpf-devexpress-dot-xpf-dot-grid-dot-gridcontrol-dot-collapsegrouprow-x28-system-dot-int32-x29.md

latest2.9 KB
Original Source

GridControl.CollapseGroupRow(Int32) Method

Collapses the specified group row.

Namespace : DevExpress.Xpf.Grid

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

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

Parameters

NameTypeDescription
rowHandleInt32

An integer value that specifies the group row’s handle. Group row handles are negative (starting from -1 ).

|

Returns

TypeDescription
Boolean

true if the specified group row has been collapsed; otherwise, false.

|

Remarks

To learn more, see Expanding and Collapsing Group Rows.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CollapseGroupRow(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.

wpf-grid-prevent-expand-collapse-operations-for-group-rows/CS/Forbid_Expand_Collapse/MainWindow.xaml.cs#L20

csharp
groupRow = grid.GetParentRowHandle(childRow);
    grid.CollapseGroupRow(groupRow);
}

wpf-grid-prevent-expand-collapse-operations-for-group-rows/VB/Forbid_Expand_Collapse/MainWindow.xaml.vb#L22

vb
groupRow = Me.grid.GetParentRowHandle(childRow)
    Me.grid.CollapseGroupRow(groupRow)
End If

See Also

ExpandGroupRow

GridControl Class

GridControl Members

DevExpress.Xpf.Grid Namespace