Back to Devexpress

DataControlBase.InvalidRowHandle Field

wpf-devexpress-dot-xpf-dot-grid-dot-datacontrolbase-97edc770.md

latest4.4 KB
Original Source

DataControlBase.InvalidRowHandle Field

Gets the handle of a row which does not exist in a View. To learn more, see Obtaining Row Handles.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public const int InvalidRowHandle = -2147483648
vb
Public Const InvalidRowHandle As Integer = -2147483648

Field Value

Type
Int32

The following code snippets (auto-collected from DevExpress Examples) contain references to the InvalidRowHandle field.

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-data-grid-handle-row-double-clicks/CS/RowDoubleClick_CodeBehind/MainWindow.xaml.cs#L46

csharp
int rowHandle = e.HitInfo.RowHandle;
if(rowHandle == GridControl.InvalidRowHandle)
    return;

how-to-focus-a-cell-with-the-specified-value-e1544/CS/DXSample_FocusingCells/Window1.xaml.cs#L15

csharp
var rowHandle = grid.FindRowByValue(grid.Columns[nameof(Product.UnitPrice)], textValue);
if (rowHandle == DataControlBase.InvalidRowHandle)
    return;

wpf-data-grid-expand-and-collapse-master-rows/CS/WpfApplication21/MainWindow.xaml.cs#L51

csharp
var focusedDetailRowHandle = ((TableView)detailView).FocusedRowHandle;
if (focusedDetailRowHandle == DataControlBase.InvalidRowHandle && rowHandle != view.FocusedRowHandle)
    grid.CollapseMasterRow(rowHandle);

wpf-data-grid-handle-row-double-clicks/VB/RowDoubleClick_CodeBehind/MainWindow.xaml.vb#L44

vb
Dim rowHandle As Integer = e.HitInfo.RowHandle
If rowHandle = DataControlBase.InvalidRowHandle Then Return
If Me.grid.IsGroupRowHandle(rowHandle) Then

how-to-focus-a-cell-with-the-specified-value-e1544/VB/DXSample_FocusingCells/Window1.xaml.vb#L18

vb
Dim rowHandle = Me.grid.FindRowByValue(Me.grid.Columns(NameOf(Product.UnitPrice)), textValue)
If rowHandle = DataControlBase.InvalidRowHandle Then Return
Me.grid.CurrentColumn = Me.grid.Columns(NameOf(Product.UnitPrice))

wpf-data-grid-expand-and-collapse-master-rows/VB/WpfApplication21/MainWindow.xaml.vb#L50

vb
Dim focusedDetailRowHandle = CType(detailView, TableView).FocusedRowHandle
    If focusedDetailRowHandle = DataControlBase.InvalidRowHandle AndAlso rowHandle <> Me.view.FocusedRowHandle Then Me.grid.CollapseMasterRow(rowHandle)
End If

See Also

DataControlBase Class

DataControlBase Members

DevExpress.Xpf.Grid Namespace