Back to Devexpress

BaseView.GotFocus Event

windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-baseview-5209549b.md

latest2.2 KB
Original Source

BaseView.GotFocus Event

Occurs when a View receives focus.

Namespace : DevExpress.XtraGrid.Views.Base

Assembly : DevExpress.XtraGrid.v25.2.dll

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

Declaration

csharp
[DXCategory("Focus")]
public event EventHandler GotFocus
vb
<DXCategory("Focus")>
Public Event GotFocus As EventHandler

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

IsFocusedView

FocusedView

FocusedViewChanged

BaseView Class

BaseView Members

DevExpress.XtraGrid.Views.Base Namespace