windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-focusedrowchangedeventargs.md
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
public int FocusedRowHandle { get; }
Public ReadOnly Property FocusedRowHandle As Integer
| Type | Description |
|---|---|
| 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
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
{
chart.SetObjectSelection(gridView1.GetRow(e.FocusedRowHandle));
}
winforms-grid-prevent-focusing-group-row/VB/Form1.vb#L28
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
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
FocusedRowChangedEventArgs Class