Version

We recommend that you use the xamDataGrid control instead of the xamGrid control. The xamGrid is being planned for retirement over the next few years and will not receive any new features. We will continue to provide support and critical bug fixes for the xamGrid during this time. For help or questions on migrating your codebase to the xamDataGrid, please contact support.

Types of Rules

There are several types of conditions that you can build. Some of these conditions use simple operators like LessThan or GreaterThan. Other conditions allow you to build complex formulas to meet your application’s individual needs.

The following lists the different types of conditions.

Numeric Rules

The numeric rules give you a simple way to perform common comparisons between two values. These rules determine the final cell style.

There are five different types of numeric rules.

  • AverageValueConditionalFormatRule - This rule highlights the cells where their value is equal to the average value of the column.

  • DataBarConditionalFormatRule - This rule inserts a bar indicating the cell value relative to other cells in the column. The rule allows the minimum / maximum range values to be specified. Using this rule, you can configure the bar appearance, the fill color, the border style and the border color. You can also configure the direction of the bar, Left-to-Right or Right-to-Left. You can also remove the value from the cells, so that only the bar is visible in the cell. If a cell value contains a negative value, you can change the appearance for the bar. Also, you can display an axis at the cell midpoint.

  • IconConditionalFormatRule - This rule inserts an icon indicating the cells value relative to other cells in the column. The rule allows for a series of images to be defined, where each image is associated with a specific sub-range of values within the larger total range value.

  • ThreeColorScaleConditionalFormatRule - This rule creates a three color gradient based on the range of the column values. The rule allows for a minimum / midpoint / maximum range values to be specified.

  • TwoColorScaleConditionalFormatRule - This rule creates a two color gradient based on the range of the column values. The rule allows the minimum/maximum range values to be specified.

Boolean Rules

Boolean rules are rules that when they are evaluated against an individual cell they result in a Boolean True / False result. Boolean rules apply the same predetermined style to each cell that matched the rule condition. Boolean rules can be configured so that if a rule results in a True value, further rules processing is stopped.

Input values for Boolean rules are:

  • Cell Value

  • Text String

  • Date

The following rules take a cell value:

The following rules take a text string:

Related Topic