A newer version of this page is available. Switch to the current version.

ColumnView.FocusedRowChanged Event

Fires when row focus moves from one row to another.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v19.2.dll


[DXCategory("Property Changed")]
public event FocusedRowChangedEventHandler FocusedRowChanged
<DXCategory("Property Changed")>
Public Event FocusedRowChanged As FocusedRowChangedEventHandler

Event Data

The FocusedRowChanged event's data class is FocusedRowChangedEventArgs. The following properties provide information specific to this event:

Property Description
FocusedRowHandle Gets the handle of the currently focused row.
PrevFocusedRowHandle Gets the handle of the previously focused row.


The FocusedRowChanged event is raised when the ColumnView.FocusedRowHandle property value changes.


When the focus moves between Views, the FocusedRowChanged event is not raised. The grid control's GridControl.FocusedViewChanged event is raised instead.

See ColumnView.FocusedRowObjectChanged to learn more.


This example expands a collapsed group row and vice versa when this row receives focus.

using DevExpress.XtraGrid.Views.Grid;
using DevExpress.XtraGrid.Views.Base;

private void gridView1_FocusedRowChanged(object sender, FocusedRowChangedEventArgs e) {
     GridView view = sender as GridView;
     if (view == null) return;
     if (view.IsGroupRow(e.FocusedRowHandle)) {
        bool expanded = view.GetRowExpanded(e.FocusedRowHandle);
        view.SetRowExpanded(e.FocusedRowHandle, !expanded);
See Also