windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-viewinfo-dot-gridhitinfo-bd1dcb1f.md
Gets or sets the handle of the row located under the test point.
Namespace : DevExpress.XtraGrid.Views.Grid.ViewInfo
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
public int RowHandle { get; set; }
Public Property RowHandle As Integer
| Type | Description |
|---|---|
| Int32 |
An integer value that specifies the handle of the row located under the test point. The GridControl.InvalidRowHandle value if the test point doesn’t belong to any row.
|
See Rows, to learn about row handles.
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.
winforms-grid-move-cell-using-drag-drop/CS/Classes/GridViewHelper.cs#L50
{
object val = (view as GridView).GetRowCellValue(gridHI.RowHandle, gridHI.Column);
if (val == null || val.ToString() == string.Empty) return;
GridHitInfo hitInfo = view.CalcHitInfo(e.Location);
if (hitInfo.HitTest == GridHitTest.Row && view.IsGroupRow(hitInfo.RowHandle))
{
winforms-grid-multiple-row-selection-web-style-checkboxes/CS/E1271/CheckMarkSelection.cs#L222
if(info.InRowCell) {
InvertRowSelection(info.RowHandle);
}
winforms-grid-select-rows-using-mouse-without-ctrl/CS/MultiSelectionHelper.cs#L47
}
_GridView.FocusedRowHandle = hi.RowHandle;
_GridView.FocusedColumn = hi.Column;
winforms-grid-multi-cell-editing/CS/MultiSelectionEditingHelper.cs#L33
GridHitInfo hi = view.CalcHitInfo(e.Location);
if (view.FocusedRowHandle == hi.RowHandle)
{
winforms-grid-move-cell-using-drag-drop/VB/Classes/GridViewHelper.vb#L44
If gridHI.HitTest = GridHitTest.RowCell Then
Dim val As Object = (TryCast(view, GridView)).GetRowCellValue(gridHI.RowHandle, gridHI.Column)
If val Is Nothing OrElse val.ToString() = String.Empty Then
Dim hitInfo As GridHitInfo = view.CalcHitInfo(e.Location)
If hitInfo.HitTest = GridHitTest.Row AndAlso view.IsGroupRow(hitInfo.RowHandle) Then
Dim viewInfo As GridViewInfo = TryCast(view.GetViewInfo(), GridViewInfo)
winforms-grid-multiple-row-selection-web-style-checkboxes/VB/E1271/CheckMarkSelection.vb#L260
If info.InRowCell Then
InvertRowSelection(info.RowHandle)
End If
winforms-grid-select-rows-using-mouse-without-ctrl/VB/MultiSelectionHelper.vb#L41
_GridView.FocusedRowHandle = hi.RowHandle
_GridView.FocusedColumn = hi.Column
winforms-grid-multi-cell-editing/VB/MultiSelectionEditingHelper.vb#L30
Dim hi As GridHitInfo = view.CalcHitInfo(e.Location)
If view.FocusedRowHandle = hi.RowHandle Then
view.FocusedColumn = hi.Column
See Also