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.v22.2.dll
NuGet Package: DevExpress.Win.Grid
Declaration
[DefaultValue(false)]
[XtraSerializableProperty]
public virtual bool AutoCalcPreviewLineCount { get; set; }
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 |
|
BandedGridView |
|
GridView |
|
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.
The GridView.MeasurePreviewHeight event provides the ability to specify the height of individual preview sections.