Back to Devexpress

GridViewHitInfoBase.RowHandle Property

wpf-devexpress-dot-xpf-dot-grid-dot-gridviewhitinfobase-69e0a7f6.md

latest4.4 KB
Original Source

GridViewHitInfoBase.RowHandle Property

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

Declaration

csharp
public int RowHandle { get; }
vb
Public ReadOnly Property RowHandle As Integer

Property Value

TypeDescription
Int32

An integer value the specifies the row’s handle.

|

Remarks

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

csharp
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

csharp
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

vb
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

vb
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

GridViewHitInfoBase Class

GridViewHitInfoBase Members

DevExpress.Xpf.Grid Namespace