wpf-devexpress-dot-xpf-dot-grid-dot-gridviewhitinfobase-69e0a7f6.md
Gets the handle of a row that contains the test object.
Namespace : DevExpress.Xpf.Grid
Assembly : DevExpress.Xpf.Grid.v25.2.dll
NuGet Package : DevExpress.Wpf.Grid.Core
public int RowHandle { get; }
Public ReadOnly Property RowHandle As Integer
| Type | Description |
|---|---|
| Int32 |
An integer value the specifies the row’s handle.
|
The RowHandle property can return the following values:
To identify whether the test object belongs to a row, use the GridViewHitInfoBase.InRow property.
The following code snippets (auto-collected from DevExpress Examples) contain references to the RowHandle property.
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-select-child-rows-in-groups-on-click/CS/GridGroupSelect/GroupChildSelector.cs#L33
TableViewHitInfo hitInfo = view.CalcHitInfo(e.OriginalSource as DependencyObject);
if (hitInfo.InRow && view.Grid.IsGroupRowHandle(hitInfo.RowHandle)) {
view.Grid.BeginSelection();
wpf-data-grid-handle-row-double-clicks/CS/RowDoubleClick_CodeBehind/MainWindow.xaml.cs#L45
void OnRowDoubleClick(object sender, RowDoubleClickEventArgs e) {
int rowHandle = e.HitInfo.RowHandle;
if(rowHandle == GridControl.InvalidRowHandle)
wpf-grid-select-child-rows-in-groups-on-click/VB/GridGroupSelect/GroupChildSelector.vb#L38
Dim hitInfo As TableViewHitInfo = view.CalcHitInfo(TryCast(e.OriginalSource, DependencyObject))
If hitInfo.InRow AndAlso view.Grid.IsGroupRowHandle(hitInfo.RowHandle) Then
view.Grid.BeginSelection()
wpf-data-grid-handle-row-double-clicks/VB/RowDoubleClick_CodeBehind/MainWindow.xaml.vb#L43
Private Sub OnRowDoubleClick(ByVal sender As Object, ByVal e As RowDoubleClickEventArgs)
Dim rowHandle As Integer = e.HitInfo.RowHandle
If rowHandle = DataControlBase.InvalidRowHandle Then Return
See Also