windowsforms-devexpress-dot-xtragrid-dot-views-dot-layout-dot-layoutviewoptionsbehavior-9799a78a.md
Gets or sets whether the top visible card is automatically focused when scrolling the View.
Namespace : DevExpress.XtraGrid.Views.Layout
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
[DefaultValue(false)]
[XtraSerializableProperty]
public virtual bool AutoFocusCardOnScrolling { get; set; }
<DefaultValue(False)>
<XtraSerializableProperty>
Public Overridable Property AutoFocusCardOnScrolling As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | false |
true if the top visible card is automatically focused when the View is scrolled; otherwise, false.
|
You can access this nested property as listed below:
| Object Type | Path to AutoFocusCardOnScrolling |
|---|---|
| LayoutView |
.OptionsBehavior .AutoFocusCardOnScrolling
|
The currently focused card is identified by the ColumnView.FocusedRowHandle property. See Rows, to learn more about row handles.
If the AutoFocusCardOnScrolling property is set to true , the top card visible is focused on View scrolling. Its handle is assigned to the ColumnView.FocusedRowHandle property, and the ColumnView.FocusedRowChanged event fires as a result.
If the AutoFocusCardOnScrolling property is set to false , focus is not changed on scrolling.
To programmatically scroll to a specific card, use the LayoutView.VisibleRecordIndex property.
See Also
LayoutViewOptionsBehavior Class