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

CardOptionsBehavior.FieldAutoHeight Property

Gets or sets a value specifying whether card field height is calculated automatically, depending on cell contents.

Namespace: DevExpress.XtraGrid.Views.Card

Assembly: DevExpress.XtraGrid.v24.2.dll

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

#Declaration

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

#Property Value

Type Default Description
Boolean false

true to enable automatic field height calculation; otherwise, false.

#Property Paths

You can access this nested property as listed below:

Object Type Path to FieldAutoHeight
CardView
.OptionsBehavior .FieldAutoHeight

#Remarks

This option only affects card fields which use MemoEdit and PictureEdit in-place editors. When the FieldAutoHeight property is set to true, the height of such fields is automatically calculated, to ensure that the field’s content is displayed in its entirety.

An editor’s height can be limited. When using a MemoEdit in-place editor, use the RepositoryItemMemoEdit.LinesCount property. When using a PictureEdit in-place editor, use the RepositoryItemPictureEdit.CustomHeight property.

The following image shows a Card View before and after the FieldAutoHeight option has been activated.

CardOptionsBehavior_FieldAutoHeight

When using a MemoEdit in-place editor, ensure that the editor’s text wrapping feature is enabled (by default, it’s enabled). See the TextOptions.WordWrap option, accessible via the editor’s RepositoryItem.Appearance object.

Refer to the Card and Layout Views topic, for additional information.

See Also