GridControl.IsGroupRowHandle(Int32) Method
Indicates whether the specified handle corresponds to a group row.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v22.1.dll
Declaration
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:
<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");
}