Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

GridControl.FocusedViewChanged Event

Fires in response to focus moving between Views.

Namespace: DevExpress.XtraGrid

Assembly: DevExpress.XtraGrid.v24.2.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