A newer version of this page is available. Switch to the current version.

GridView.PreviewLineCount Property

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

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v19.2.dll


public int PreviewLineCount { get; set; }
Public Property PreviewLineCount As Integer

Property Value

Type Default Description


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


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