Skip to main content

BaseView.DetailHeight Property

Gets or sets the maximum height of a View when it serves as a detail View.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v24.2.dll

Declaration

[DefaultValue(350)]
[DXCategory("Appearance")]
[XtraSerializableProperty]
public virtual int DetailHeight { get; set; }

Property Value

Type Default Description
Int32 350

An integer value specifying the View height in pixels.

Remarks

The DetailHeight property of pattern Views specifies the maximum height its clones have when an end-user expands master rows. When you change the DetailHeight property of an expanded clone view, this clone’s height is changed. A detail does not display empty space below its rows. So, the detail height cannot be greater than the height required to display all detail rows.

The following applies to Layout Views (LayoutView objects), when they are displayed as details.

Auto-height mode is enabled for detail Layout Views by default. The DetailHeight property specifies the detail’s maximum height. The detail shrinks its height to vertically fit displayed cards (see LayoutViewOptionsView.ViewMode and LayoutViewOptionsMultiRecordMode.MaxCardRows).

If you need a detail height to be fixed and equal to a specific value, disable the auto-height feature with the LayoutView.DetailAutoHeight property and specify the required height via the DetailHeight setting.

The detail auto-height feature is not in effect if card stretching is enabled via the StretchCardToViewHeight property (see LayoutViewOptionsSingleRecordMode.StretchCardToViewHeight and LayoutViewOptionsMultiRecordMode.StretchCardToViewHeight).

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DetailHeight property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also