Back to Devexpress

FocusedRowChangedEventArgs.FocusedRowHandle Property

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

latest3.7 KB
Original Source

FocusedRowChangedEventArgs.FocusedRowHandle Property

Gets the handle of the currently focused row.

Namespace : DevExpress.XtraGrid.Views.Base

Assembly : DevExpress.XtraGrid.v25.2.dll

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

Declaration

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

Property Value

TypeDescription
Int32

An integer value representing the handle of the currently focused row. The GridControl.InvalidRowHandle field value if no row is currently focused.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the FocusedRowHandle 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-prevent-focusing-group-row/CS/Form1.cs#L28

csharp
int focusedRowHandle = -1;
if (e.FocusedRowHandle == GridControl.NewItemRowHandle || e.FocusedRowHandle == GridControl.AutoFilterRowHandle)
    return;

winforms-charts-show-chart-legend-with-markers-in-separate-control/CS/Form1.cs#L91

csharp
{
    chart.SetObjectSelection(gridView1.GetRow(e.FocusedRowHandle));
}

winforms-grid-prevent-focusing-group-row/VB/Form1.vb#L28

vb
Dim focusedRowHandle As Integer = -1
If e.FocusedRowHandle = GridControl.NewItemRowHandle OrElse e.FocusedRowHandle = GridControl.AutoFilterRowHandle Then Return
Dim view As GridView = CType(sender, GridView)

winforms-charts-show-chart-legend-with-markers-in-separate-control/VB/Form1.vb#L83

vb
Private Sub gridView1_FocusedRowChanged(ByVal sender As Object, ByVal e As DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs)
    chart.SetObjectSelection(gridView1.GetRow(e.FocusedRowHandle))
End Sub

See Also

PrevFocusedRowHandle

FocusedRowChangedEventArgs Class

FocusedRowChangedEventArgs Members

DevExpress.XtraGrid.Views.Base Namespace