GridControl.CustomCellAppearance Event
Allows you to customize cell appearance.
Namespace: DevExpress.UI.Xaml.Grid
Assembly: DevExpress.UI.Xaml.Grid.v21.2.dll
NuGet Package: DevExpress.Uwp.Controls
Declaration
Event Data
The CustomCellAppearance event's data class is CustomCellAppearanceEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
CellConditionalFormat | Gets the conditional format applied to the cell. |
CellControl | Provides access to the object used to visualize the cell. |
Column | Gets the cell’s column |
IsCellSelected | Indicates whether the cell is selected. |
IsRowSelected | Indicates whether the row is selected. |
ResultFormat | Provides access to the appearance settings applied to the cell. |
RowConditionalFormat | Gets the conditional format applied to the row. |
RowHandle | Gets the handle of the cell’s row. |
Remarks
The event’s ResultFormat property provides access to the appearance settings.
You can use the CustomCellAppearance event to override conditional formatting. The event’s CellConditionalFormat and RowConditionalFormat properties return the appearance settings defined by the conditional formatting rules.
See the example below.
void CustomCellAppearance(object sender, CustomCellAppearanceEventArgs e) {
e.ResultFormat.Foreground = e.CellConditionalFormat?.Foreground ?? e.RowConditionalFormat?.Foreground ?? e.ResultFormat.Foreground;
}
See Also