Skip to main content
A newer version of this page is available. .

GridView.ColumnPanelRowHeight Property

Gets or sets the column header row height.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v18.2.dll

Declaration

[DefaultValue(-1)]
[DXCategory("Appearance")]
[XtraSerializableProperty(XtraSerializationFlags.AutoScaleY)]
public virtual int ColumnPanelRowHeight { get; set; }

Property Value

Type Default Description
Int32 -1

An integer value specifying the column header row height in pixels. -1 to calculate this height automatically depending on column header contents.

Remarks

When the ColumnPanelRowHeight property value is -1, the column header row height is calculated depending on the column header content. The height is calculated to fit the header image with a single text line (according to its current style). Note that the column header row height cannot be less than this calculated value regardless of the ColumnPanelRowHeight property. The property can only be used to increase the header height.

In Grid Views and Banded Grid Views columns are always arranged into a single row. Thus, the ColumnPanelRowHeight property specifies the actual column header height. In Advanced Banded Grid Views, column headers can be rearranged into several rows. You can also use a column’s BandedGridColumn.RowCount property to specify the number of rows occupied by the column header. If the BandedGridColumn.AutoFillDown property value is true the column header is automatically resized to occupy the empty rows below it. In this case, the actual column header height depends on the ColumnPanelRowHeight, BandedGridColumn.RowCount and BandedGridColumn.AutoFillDown properties in combination.

The following code snippets (auto-collected from DevExpress Examples) contain references to the ColumnPanelRowHeight property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also