GridOptionsView.AutoCalcPreviewLineCount Property

Gets or sets a value specifying whether the number of text lines within preview sections is calculated automatically depending on their contents.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v20.1.dll

Declaration

[DefaultValue(false)]
[XtraSerializableProperty]
public virtual bool AutoCalcPreviewLineCount { get; set; }
<DefaultValue(False)>
<XtraSerializableProperty>
Public Overridable Property AutoCalcPreviewLineCount As Boolean

Property Value

Type Default Description
Boolean

false

true to enable automatic calculation of preview sections' height; otherwise, false.

Property Paths

You can access this nested property as listed below:

Object Type Path to AutoCalcPreviewLineCount
AdvBandedGridView
.OptionsView.AutoCalcPreviewLineCount
AdvBandedGridView
.OptionsView.AutoCalcPreviewLineCount
AdvBandedGridView
.OptionsView.AutoCalcPreviewLineCount
BandedGridView
.OptionsView.AutoCalcPreviewLineCount
BandedGridView
.OptionsView.AutoCalcPreviewLineCount
GridView
.OptionsView.AutoCalcPreviewLineCount

Remarks

If active, the number of text lines within preview sections is automatically reduced if the text to be displayed requires fewer lines than specified by the GridView.PreviewLineCount property. This allows you to remove empty lines within preview sections. Note that you can also apply automatic calculation without having the predefined maximum text lines displayed. Set the GridView.PreviewLineCount property to -1 for this purpose.

When the AutoCalcPreviewLineCount option is enabled, preview sections may have different heights. The image below illustrates this.

GridOptionsView_AutoCalcPreviewLineCount

The GridView.MeasurePreviewHeight event provides the ability to specify the height of individual preview sections.

See Also