[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Collapse]Xamarin Controls
 [Collapse]Grid
  [Expand]Installation and Demos
  [Expand]Getting Started
  [Expand]Grid Elements
   Themes Overview
  [Collapse]Conditional Formatting
    Predefined Format Names
  [Expand]End-User Interaction
  [Expand]Examples
  [Expand]Tips and Tricks
 [Expand]API Reference
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Conditional Formatting

Important

This documentation topic describes legacy technology. We no longer develop new functionality for the GridControl and suggest that you use the new DataGridView control instead.

The GridControl includes a Microsoft Excel-inspired conditional formatting feature, which allows you to change the appearance of individual cells or rows based on specific conditions. This feature helps to highlight critical information, identify trends and exceptions, and compare data. Formatting rules can be created at design time (XAML markup) and runtime (C# code).

All conditional formatting rules specified in a grid are stored in the FormatConditionCollection collection, accessible from the GridControl.FormatConditions property. The table below lists the available types of conditional formatting rules and classes representing these rules.

Condition Class

Description

Format Example

Image

FormatCondition Applies a format if a column's value meets a specified condition (Equal, Less, Between, etc.), or a specific expression. How to: Highlight Column Values that Match a Condition
How to: Apply a Format Based on an Expression
DataBarFormatCondition Formats cells by using data bars. Data bars fill column cells proportionally, based on cell values relative to other cells. How to: Apply a Data Bar Format to a Column
TopBottomRuleFormatCondition Formats cells whose values are highest or lowest in a column. How to: Highlight Top Cell Values in a Column
ColorScaleFormatCondition Formats column cells by using two or three color scales to display data distribution and variation. How to: Apply a Color Scale Format to a Column
IconSetFormatCondition Formats cells by using icon sets. How to: Apply an Icon Set Format to a Column

Expanded See Also

Is this topic helpful?​​​​​​​