Back to Devexpress

GridViewColumn.CellStyle Property

aspnet-devexpress-dot-web-dot-gridviewcolumn-469a73f4.md

latest2.3 KB
Original Source

GridViewColumn.CellStyle Property

Gets the style settings used to paint column cells.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public virtual GridViewCellStyle CellStyle { get; }
vb
Public Overridable ReadOnly Property CellStyle As GridViewCellStyle

Property Value

TypeDescription
GridViewCellStyle

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

|

Remarks

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).

Limitations

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.

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

See Also

Styles

Cell

FooterCellStyle

HeaderStyle

EditCellStyle

Grid View

GridViewColumn Class

GridViewColumn Members

DevExpress.Web Namespace