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

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.v24.2.dll

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

#Declaration

[DefaultValue(false)]
[XtraSerializableProperty]
public virtual bool AutoFocusCardOnScrolling { get; set; }

#Property Value

Type Default Description
Boolean false

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 Type Path 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