Back to Devexpress

LayoutViewOptionsBehavior.AutoFocusCardOnScrolling Property

windowsforms-devexpress-dot-xtragrid-dot-views-dot-layout-dot-layoutviewoptionsbehavior-9799a78a.md

latest3.2 KB
Original Source

LayoutViewOptionsBehavior.AutoFocusCardOnScrolling Property

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

Declaration

csharp
[DefaultValue(false)]
[XtraSerializableProperty]
public virtual bool AutoFocusCardOnScrolling { get; set; }
vb
<DefaultValue(False)>
<XtraSerializableProperty>
Public Overridable Property AutoFocusCardOnScrolling As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true if the top visible card is automatically focused when the View is scrolled; otherwise, false.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to AutoFocusCardOnScrolling
LayoutView

.OptionsBehavior .AutoFocusCardOnScrolling

|

Remarks

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

FocusedRowHandle

FocusedRowChanged

VisibleRecordIndex

Rows

LayoutViewOptionsBehavior Class

LayoutViewOptionsBehavior Members

DevExpress.XtraGrid.Views.Layout Namespace