Skip to main content

GridControl.IsGroupRowHandle(Int32) Method

Indicates whether the specified handle corresponds to a group row.

Namespace: DevExpress.Xpf.Grid

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

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

public bool IsGroupRowHandle(
    int rowHandle
)

Parameters

Name Type Description
rowHandle Int32

An integer value that specifies the row’s handle.

Returns

Type Description
Boolean

true if the specified handle corresponds to a group row; otherwise, false.

Remarks

Group row handles are negative (start from -1). The IsGroupRowHandle method returns false, if the specified handle corresponds to a data row or invalid row.

To learn more, see Grouping and Identifying Rows and Cards.

Example

The following example demonstrates how to use the TableView.RowDoubleClick event to process double-clicks:

View Example: How to Handle Row Double-clicks

<dxg:GridControl x:Name="grid">
<!-- ... -->
    <dxg:GridControl.View>
        <dxg:TableView RowDoubleClick="OnRowDoubleClick"/>
    </dxg:GridControl.View>
</dxg:GridControl>
void OnRowDoubleClick(object sender, RowDoubleClickEventArgs e) {
    int rowHandle = e.HitInfo.RowHandle;
    if(rowHandle == GridControl.InvalidRowHandle)
        return;
    if(grid.IsGroupRowHandle(rowHandle))
        MessageBox.Show("A group row has been double clicked.", "Info");
    else
        MessageBox.Show("A data row has been double clicked.", "Info");
}

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

See Also