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

BaseView.GotFocus Event

Occurs when a View receives focus.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v24.2.dll

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

#Declaration

[DXCategory("Focus")]
public event EventHandler GotFocus

#Event Data

The GotFocus event's data class is EventArgs.

#Remarks

Use the GotFocus event to perform actions when a View obtains focus. It fires when moving focus to a View from another control, switching between Views or clones of a View. The View (clone) that received focus is identified by the event sender. It can also be obtained using the GridControl.FocusedView property.

When a View (clone) loses focus, the BaseView.LostFocus event is raised. The GotFocus and BaseView.LostFocus events are useful if you need to respond to moving focus to or away from a View. If you need to provide a general response to changing View focus, handle the GridControl.FocusedViewChanged event.

See Also