windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-gridoptionsview-cd287e0f.md
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.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
[DefaultValue(false)]
[XtraSerializableProperty]
public virtual bool AutoCalcPreviewLineCount { get; set; }
<DefaultValue(False)>
<XtraSerializableProperty>
Public Overridable Property AutoCalcPreviewLineCount As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | false |
true to enable automatic calculation of preview sections’ height; otherwise, false.
|
You can access this nested property as listed below:
| Object Type | Path to AutoCalcPreviewLineCount |
|---|---|
| GridView |
.OptionsView .AutoCalcPreviewLineCount
|
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.
The GridView.MeasurePreviewHeight event provides the ability to specify the height of individual preview sections.
See Also