Skip to main content

GridControl.FocusedViewChanged Event

Fires in response to focus moving between Views.

Namespace: DevExpress.XtraGrid

Assembly: DevExpress.XtraGrid.v24.1.dll

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

Declaration

[DXCategory("Grid")]
public event ViewFocusEventHandler FocusedViewChanged

Event Data

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

Property Description
PreviousView Gets a value representing the previously focused View.
View Gets a value representing the currently focused View.

Remarks

When the grid control works in master-detail mode, several Views can be displayed at once. End-users can move focus between Views using a number of methods - clicking a View’s cell, using the keyboard or the embedded data navigator, etc. You can also move focus between Views via code using the GridControl.FocusedView property. If you need to respond to focus moving between Views handle the FocusedViewChanged event. Note that this event fires regardless of whether focus has been moved by end-users or via code.

To deal with focus moving to or from a particular view, handle the View’s BaseView.GotFocus and BaseView.LostFocus events.

See Also