Skip to main content

LayoutView.DetailAutoHeight Property

Gets or sets whether a detail auto height feature is enabled. This property is applied to Layout Views when they serve as detail Views.

Namespace: DevExpress.XtraGrid.Views.Layout

Assembly: DevExpress.XtraGrid.v24.1.dll

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


public bool DetailAutoHeight { get; set; }

Property Value

Type Default Description
Boolean true

true if a detail auto height feature is enabled; otherwise, false.


When a detail auto height feature is enabled, the value specified by the BaseView.DetailHeight property is interpreted as the maximum detail height. The height of detail sections will be adjusted to tightly fit cards, without extra padding at the top and bottom. So, the actual height will be equal to or less than the DetailHeight.

The detail auto height feature is not in effect if card stretching is enabled via the StretchCardToViewHeight property (see LayoutViewOptionsSingleRecordMode.StretchCardToViewHeight and LayoutViewOptionsMultiRecordMode.StretchCardToViewHeight). In this instance, a detail’s height is specified by the DetailAutoHeight property.

If the DetailAutoHeight property is set to false, the height of detail sections is not auto-adjusted, and is equal to the value specified by the BaseView.DetailHeight property.

You can specify the card layout and the number of card rows via the LayoutViewOptionsView.ViewMode and LayoutViewOptionsMultiRecordMode.MaxCardRows options.

See Also