VGridControlBase.FocusedRowChanged Event
Fires in response to row focus moving.
Namespace: DevExpress.XtraVerticalGrid
Assembly: DevExpress.XtraVerticalGrid.v18.1.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 Scrolling and Focusing 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;
}
}
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FocusedRowChanged event.
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.