Skip to main content
Tab

ASPxGridViewSettings.ShowColumnHeaders Property

Specifies whether column headers are visible.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(true)]
public bool ShowColumnHeaders { get; set; }

Property Value

Type Default Description
Boolean true

true to display column headers; otherwise, false.

Property Paths

You can access this nested property as listed below:

Object Type Path to ShowColumnHeaders
ASPxGridView
.Settings .ShowColumnHeaders
GridViewProperties
.Settings .ShowColumnHeaders

Remarks

The example below demonstrates how to hide column headers in the exported document. For this purpose, set the ShowColumnHeaders property to false in the BeforeExport event handler.

<dx:ASPxGridView ID="grid" runat="server" DataSourceID="CustomerReportsDataSource" 
    OnBeforeExport="grid_BeforeExport"/>
protected void grid_BeforeExport(object sender, DevExpress.Web.ASPxGridBeforeExportEventArgs e) {
    grid.Settings.ShowColumnHeaders = false;
}

When the ShowColumnHeaders property is set to false, the ColumnResizeMode property is ignored and column resizing is disabled.

See Also