Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

FormatConditionRuleDataUpdate.Trigger Property

Gets or sets when to activate the format.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

[DefaultValue(FormatConditionDataUpdateTrigger.ValueChanged)]
[DXCategory("Behavior")]
[XtraSerializableProperty]
public FormatConditionDataUpdateTrigger Trigger { get; set; }

#Property Value

Type Default Description
FormatConditionDataUpdateTrigger ValueChanged

A value that specifies when to activate the format.

Available values:

Name Description
Custom

Allows you to implement a custom trigger for the format rule by handling the GridView.FormatRuleDataUpdateCustomTrigger event. End-users are not able to access and modify custom triggers at runtime (in the Conditional Formatting Rules Manager).

ValueIncreased

Activates a format when a value increases.

ValueDecreased

Activates a format when a value decreases.

ValueChanged

Activates a format when a value changes.

#Remarks

#Example

This example uses a FormatConditionRuleDataUpdate format to temporarily highlight cells when their values increase. The highlight effect includes a custom background color and icon.

XtraGrid.GridFormatRule gridFormatRule = new DevExpress.XtraGrid.GridFormatRule();
DevExpress.XtraEditors.FormatConditionRuleDataUpdate formatConditionRuleDataUpdate = new DevExpress.XtraEditors.FormatConditionRuleDataUpdate();
gridFormatRule.Column = gridView1.Columns["Change"];
gridFormatRule.Name = "Format1";
formatConditionRuleDataUpdate.HighlightTime = 500;
formatConditionRuleDataUpdate.Icon.PredefinedName = "Flags3_1.png";
formatConditionRuleDataUpdate.PredefinedName = "Green Fill";
formatConditionRuleDataUpdate.Trigger = FormatConditionDataUpdateTrigger.ValueIncreased;
gridFormatRule.Rule = formatConditionRuleDataUpdate;
gridView1.FormatRules.Add(gridFormatRule);
See Also