Back to Devexpress

Conditional Formatting

xamarin-262305-grid-conditional-formatting.md

latest3.6 KB
Original Source

Conditional Formatting

  • Apr 19, 2019
  • 2 minutes to read

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

|

|

See Also

Predefined Format Names