Back to Devexpress

GridOptionsView.AutoCalcPreviewLineCount Property

windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-gridoptionsview-cd287e0f.md

latest3.3 KB
Original Source

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.v25.2.dll

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

Declaration

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

Property Value

TypeDefaultDescription
Booleanfalse

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

|

Property Paths

You can access this nested property as listed below:

Object TypePath to 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.

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

See Also

PreviewLineCount

ShowPreview

MeasurePreviewHeight

Row Preview Sections

GridOptionsView Class

GridOptionsView Members

DevExpress.XtraGrid.Views.Grid Namespace