Skip to main content

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

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