BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
//color rows and alternates rows if their Age value is between 30 and 40.
GridConditionalFormatDescriptor format = new GridConditionalFormatDescriptor("specialColor");
format.Expression = "[Age] > 30 And [Age] < 40";
format.Appearance.AlternateRecordFieldCell.BackColor = Color.LightGoldenrodYellow;
format.Appearance.AnyRecordFieldCell.BackColor = Color.LightBlue;
this.gridGroupingControl1.TableDescriptor.ConditionalFormats.Add(format);
GroupingDataSample_3560.zip
''OK is a checkbox column
format.Expression = "[OK] LIKE ''true''"
''states that start with N
format.Expression = "[State] LIKE ''N*''"
''only NC
format.Expression = "[State] LIKE ''NC''"
between - Checks if a date field value between the two values is listed in the right-hand operand. For example, [date] between {2/25/2004, 3/2/2004} returns 1 for any record whose date field is greater or equal 2/25/2004 and less than 3/2/2004. To represent the current date, use the token TODAY. To represent DateTime.MinValue, leave the first argument empty. To represent DateTime.MaxValue, leave the second argument empty.
GridConditionalFormatDescriptor format = new GridConditionalFormatDescriptor("Before Dec");
format.Expression = "[CreateDate] between {,2004-12-01}";
format.Appearance.AlternateRecordFieldCell.BackColor = Color.LightGoldenrodYellow;
format.Appearance.AnyRecordFieldCell.BackColor = Color.LightGoldenrodYellow;
this.gridGroupingControl1.TableDescriptor.ConditionalFormats.Add(format);