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

GridViewColumn.CellStyle Property

Gets the style settings used to paint column cells.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll


public virtual GridViewCellStyle CellStyle { get; }

Property Value

Type Description

A GridViewCellStyle object that contains the style settings used to paint column cells.


Use the CellStyle property to specify the appearance of cells within an individual column. These style settings override the style settings common to all cells within a Grid View (GridViewStyles.Cell).


  • Setting the Wrap property to false has no effect when the ColGroup tag is used in IE (column resizing).


    Example: Apply to all columns.

                    <span style="white-space:nowrap"><%# Container.Text %></span>


    Example: Apply to a single column.

    <dxwgv:GridViewDataTextColumn FieldName="CustomerName" VisibleIndex="2">
            <span style="white-space:nowrap"><%# Container.Text %></span>
  • All settings set to the CellStyle property are overridden by the conditional formatting styles. However, all styles specified in the CellStyle.CssClass property are merged with the conditional formatting styles. To preserve the previously added cell styles, use the CssClass property as shown below.

    .cellStyle {
        vertical-align: top !important;
    <CellStyle VerticalAlign="Top" CssClass="cellStyle"></CellStyle>
See Also