Back to Devexpress

GridControl.IsGroupRowExpanded(Int32) Method

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

latest4.5 KB
Original Source

GridControl.IsGroupRowExpanded(Int32) Method

Indicates whether the specified group row is expanded.

Namespace : DevExpress.Xpf.Grid

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

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

Parameters

NameTypeDescription
rowHandleInt32

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

|

Returns

TypeDescription
Boolean

true if the specified row is expanded; otherwise, false.

|

Remarks

To learn more, see Obtaining Row Handles and Expanding and Collapsing Group Rows.

The following code snippets (auto-collected from DevExpress Examples) contain references to the IsGroupRowExpanded(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.

how-to-create-search-window-with-find-previous-and-find-next-buttons-in-gridcontrol-t127527/CS/DevExpress.Example01/SearchBehavior/SearchWindow.xaml.cs#L232

csharp
if(this._Grid.IsGroupRowHandle(rowHandle)) {
    if(!this._Grid.IsGroupRowExpanded(rowHandle)) {
        rowHandles.AddRange(GetDataRowHandlesInGroup(rowHandle));

wpf-grid-select-child-rows-in-groups-on-click/CS/GridGroupSelect/GroupChildSelector.cs#L47

csharp
&& grid.IsGroupRowHandle(childRowHandle)
&& grid.IsGroupRowExpanded(childRowHandle)) {
SelectChild(grid, childRowHandle);

how-to-create-search-window-with-find-previous-and-find-next-buttons-in-gridcontrol-t127527/VB/DevExpress.Example01/SearchBehavior/SearchWindow.xaml.vb#L226

vb
If _Grid.IsGroupRowHandle(rowHandle) Then
    If Not _Grid.IsGroupRowExpanded(rowHandle) Then
        rowHandles.AddRange(GetDataRowHandlesInGroup(rowHandle))

wpf-grid-select-child-rows-in-groups-on-click/VB/GridGroupSelect/GroupChildSelector.vb#L51

vb
Dim childRowHandle As Integer = grid.GetChildRowHandle(groupRowHandle, i)
If GetMode(grid.View) = ChildSelectionMode.Hierarchical AndAlso grid.IsGroupRowHandle(childRowHandle) AndAlso grid.IsGroupRowExpanded(childRowHandle) Then
    SelectChild(grid, childRowHandle)

See Also

ExpandGroupRow

CollapseGroupRow

ExpandFocusedRow()

CollapseFocusedRow()

GridControl Class

GridControl Members

DevExpress.Xpf.Grid Namespace