Table of Contents

TTMSFNCCustomFilterRulesManager Class

Non-visual component that owns a collection of filter rules and applies them by resolving item paths, evaluating filter expressions, and writing property values via RTTI.

API unit family: TMS.TMSFNCFilterRulesManager Inherits from: TComponent

Syntax

TTMSFNCCustomFilterRulesManager = class(TComponent)

Remarks

Drop on a form or create in code. Add rules via AddRule, ShowWhere, HideWhere, EnableWhere, DisableWhere, or the AddRuleXxx shortcuts, then call Apply to evaluate all active rules. Use the published TTMSFNCFilterRulesManager subclass to expose Rules and events in the DFM designer.

Methods

Name Description
AddRule Adds a rule with a raw filter-text expression and one action (match value only); returns the new rule.
Apply Applies all active rules in order, firing OnBeforeApply and OnAfterApply events.
ApplyActiveRules Applies active rules whose Name matches APattern using SQL-LIKE wildcards (% = any sequence, _ = one char); prefix with ! to invert the match.
ApplyInactiveRule Pushes inactive values for one rule regardless of its Active flag; fires rule-level events.
ApplyRule Applies a single rule, respecting its Active flag; fires rule-level events.
GetRuleByName Returns the first rule whose Name matches AName (case-insensitive), or nil when not found.

Used by