VGridControlBase.FocusedRowChanged Event
Fires in response to row focus moving.
Namespace: DevExpress.XtraVerticalGrid
Assembly: DevExpress.XtraVerticalGrid.v24.2.dll
Declaration
Event Data
The FocusedRowChanged event's data class is FocusedRowChangedEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
OldRow | Gets the previously focused row. |
Row | Gets the processed row. Inherited from RowEventArgs. |
Remarks
The FocusedRowChanged event is raised when an end-user moves focus from one row to another or in response to changing the VGridControlBase.FocusedRow property in code.
This event parameter’s FocusedRowChangedEventArgs.OldRow and RowEventArgs.Row properties allow the previously and currently focused row to be determined, respectively.
For more information, see Focus and Scroll Rows.
Example
The following sample code handles the VGridControlBase.FocusedRowChanged
event to show an image within the focused row header.
using DevExpress.XtraVerticalGrid.Events;
private void vGridControl1_FocusedRowChanged(object sender, FocusedRowChangedEventArgs e) {
if (e.OldRow == null){
e.Row.Properties.ImageIndex = 0;
}
else {
e.Row.Properties.ImageIndex = 0;
e.OldRow.Properties.ImageIndex = -1;
}
}