ColumnBase.CellStyle Property

Gets or sets the style of cells displayed within this column. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v20.1.Core.dll


public Style CellStyle { get; set; }
Public Property CellStyle As Style

Property Value

Type Description

The style of cells displayed within this column.


The CellStyle property specifies the style that groups together properties, resources, and event handlers and shares them between instances of the target type.

Target Type:

<dxg:GridColumn FieldName="Name">
        <Style TargetType="dxg:LightweightCellEditor" />

To specify the styles applied to the column's data cell displayed within the New Item Row and Auto Filter Row, use the ColumnBase.NewItemRowCellStyle and ColumnBase.AutoFilterRowCellStyle properties, respectively.

The GridControl's CellStyle property is theme dependent. Create a new style based on the existing cell style to apply a CellStyle. E.g., if you are using the MetropolisDark theme, your style's BasedOn property should be set to the following value:

    <Style TargetType="dxg:LightweightCellEditor" 
           BasedOn="{StaticResource {dxgt:GridRowThemeKey ResourceKey=LightweightCellStyle, ThemeName=MetropolisDark}}"/>
See Also