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

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

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

#Declaration

[DefaultValue(true)]
[DXCategory("Behavior")]
[XtraSerializableProperty]
public bool DetailAutoHeight { get; set; }

#Property Value

Type Default Description
Boolean true

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

#Remarks

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