Back to Devexpress

RowEventArgs.RowHandle Property

windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-roweventargs.md

latest4.0 KB
Original Source

RowEventArgs.RowHandle Property

Gets the row’s handle (position). For the ColumnView.RowUpdated event, this property specifies the previous handle (position) of the currently processed row. NewItemRowHandle value when a new row is added.

Namespace : DevExpress.XtraGrid.Views.Base

Assembly : DevExpress.XtraGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

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

Property Value

TypeDescription
Int32

An integer value representing the row’s handle.

|

Remarks

Please refer to the Rows and Working with Groups in Code topics for details on identifying data and group rows by their 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-multiple-row-selection-web-style-checkboxes/CS/E1271/CheckMarkSelection.cs#L249

csharp
void view_RowStyle(object sender, RowStyleEventArgs e) {
    if(IsRowSelected(e.RowHandle)) {
        e.Appearance.BackColor = SystemColors.Highlight;

winforms-grid-crud-operations-odata/CS/DxSample/MainForm.cs#L24

csharp
private void GridView_RowUpdated(object sender, RowObjectEventArgs e) {
    if (e.RowHandle == GridControl.NewItemRowHandle)
        this.Context.AddToOrders((Order)e.Row);

winforms-grid-multiple-row-selection-web-style-checkboxes/VB/E1271/CheckMarkSelection.vb#L290

vb
Private Sub view_RowStyle(ByVal sender As Object, ByVal e As RowStyleEventArgs)
    If IsRowSelected(e.RowHandle) Then
        e.Appearance.BackColor = SystemColors.Highlight

winforms-grid-crud-operations-odata/VB/DxSample/MainForm.vb#L26

vb
Private Sub GridView_RowUpdated(ByVal sender As Object, ByVal e As RowObjectEventArgs) Handles GridView.RowUpdated
    If e.RowHandle = GridControl.NewItemRowHandle Then
        Me.Context.AddToOrders(DirectCast(e.Row, Order))

See Also

RowEventArgs Class

RowEventArgs Members

DevExpress.XtraGrid.Views.Base Namespace