Skip to main content

GridView.PreviewLineCount Property

Gets or sets the number of text lines within preview sections.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v24.1.dll

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

Declaration

[DefaultValue(-1)]
[DXCategory("Appearance")]
[XtraSerializableProperty]
public int PreviewLineCount { get; set; }

Property Value

Type Default Description
Int32 -1

An integer value specifying the number of text lines within preview sections.

Remarks

The PreviewLineCount property is used in combination with the GridOptionsView.AutoCalcPreviewLineCount option. If the option is disabled, all preview sections have the same height. This height is calculated to fit the number of text lines specified by the PreviewLineCount property. If the PreviewLineCount property value is -1, preview sections contain a single text line. Note that the height of single text line is calculated based on the applied style settings .

If the GridOptionsView.AutoCalcPreviewLineCount option is enabled, the number of text lines required to fit the preview text is calculated automatically. The PreviewLineCount property specifies the maximum number of lines that can be displayed in each section. When the PreviewLineCount property value is -1, the actual height of preview sections depends upon only their content .

Note: assigning values less than 1 results in setting the property to -1.

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

See Also