Class NoxConditionalFormat
Conditional formatting rule. Example: red background when the quantity column is greater than 100.
NoxGrid1.ConditionalFormats.Add("colQty", NoxConditionOperator.GreaterThan, "100", Color.MistyRose).
Rules are evaluated from the top; the colors and bold of the first matching rule win (StopIfTrue skips the remaining rules).
[TypeConverter(typeof(NoxConditionalFormatConverter))]
public class NoxConditionalFormat
- Inheritance
-
NoxConditionalFormat
- Inherited Members
Constructors
NoxConditionalFormat()
Creates an empty rule (set the column, operator and colors).
public NoxConditionalFormat()
NoxConditionalFormat(string, NoxConditionOperator, string, Color)
Creates a rule for a column with one value and a background color.
public NoxConditionalFormat(string columnName, NoxConditionOperator op, string value1, Color backColor)
Parameters
columnNamestringopNoxConditionOperatorvalue1stringbackColorColor
NoxConditionalFormat(string, NoxConditionOperator, string, string, Color, Color)
Creates a rule for a column with two values (Between, NotBetween) and colors (Color.Empty keeps the cell color).
public NoxConditionalFormat(string columnName, NoxConditionOperator op, string value1, string value2, Color backColor, Color foreColor)
Parameters
columnNamestringopNoxConditionOperatorvalue1stringvalue2stringbackColorColorforeColorColor
Properties
ApplyToRow
When the condition matches, formats the entire row instead of the cell. Default: False.
public bool ApplyToRow { get; set; }
Property Value
BackColor
Background color when the condition matches.
public Color BackColor { get; set; }
Property Value
Bold
Bold text when the rule matches.
public bool Bold { get; set; }
Property Value
ColumnName
Name of the column whose value is tested. Empty means every column tests its own value. Default: empty.
public string ColumnName { get; set; }
Property Value
Enabled
Whether the rule is applied. Default: True.
public bool Enabled { get; set; }
Property Value
ForeColor
Text color when the condition matches.
public Color ForeColor { get; set; }
Property Value
Formula
Formula used when Operator = Formula (relative to the first row, e.g. =$D1>100). Default: empty.
public string Formula { get; set; }
Property Value
Italic
Italic text when the rule matches.
public bool Italic { get; set; }
Property Value
MaxColor
ColorScale: color of the highest value.
public Color MaxColor { get; set; }
Property Value
MidColor
ColorScale: color of the midpoint (empty for a two-color scale).
public Color MidColor { get; set; }
Property Value
MinColor
ColorScale: color of the lowest value.
public Color MinColor { get; set; }
Property Value
Operator
The kind of condition. Default: GreaterThan.
public NoxConditionOperator Operator { get; set; }
Property Value
StopIfTrue
When this rule matches, later rules are not evaluated. Default: False.
public bool StopIfTrue { get; set; }
Property Value
Strikeout
Strikethrough. Default: False.
public bool Strikeout { get; set; }
Property Value
Value1
Value to compare (number, date or text). Starting with = makes it a formula (e.g. =C1, relative to the first row). Default: empty.
public string Value1 { get; set; }
Property Value
Value2
The second value for Between and NotBetween. Default: empty.
public string Value2 { get; set; }
Property Value
Methods
ToString()
public override string ToString()