TTMSFNCDataGridConditionalFormatting.AddExpressionRule Method
Adds a
grtExpressionrule that matches rows for which a boolean expression evaluates to true.
API unit family: TMSFNCDataGridConditionalFormatting
Declaring type: TTMSFNCDataGridConditionalFormatting
Syntax
function AddExpressionRule(const AExpression: string): TTMSFNCDataGridFormatRuleItem;
TTMSFNCDataGridFormatRuleItem* __fastcall AddExpressionRule(const System::UnicodeString AExpression);
Remarks
The rule's scope is grsGrid, so a matching row is formatted in every column; chain TTMSFNCDataGridFormatRuleItem.ForColumn to format a single column instead. A bare condition without [ ] binds to TTMSFNCDataGridFormatRuleItem.Column, which is 0 unless set; see TTMSFNCDataGridFormatRuleItem.EffectiveExpression.
Parameters
| Name | Description |
|---|---|
AExpression |
The boolean expression evaluated against each row, in the grid's filter expression syntax. |
Returns
The newly added rule, owned by the collection.