Skip to main content
Table of Contents

TTMSFNCDataGridConditionalFormatting.AddTopBottomRule Method

Adds a grtTopBottom rule that matches the top or bottom N values of a column.

API unit family: TMSFNCDataGridConditionalFormatting Declaring type: TTMSFNCDataGridConditionalFormatting

Syntax

FMX.TMSFNCDataGridConditionalFormatting.hppPascalC++
function AddTopBottomRule(AColumn: Integer; AKind: TTMSFNCDataGridRankKind; ACount: Integer): TTMSFNCDataGridFormatRuleItem;
TTMSFNCDataGridFormatRuleItem* __fastcall AddTopBottomRule(int AColumn, TTMSFNCDataGridRankKind AKind, int ACount);

Remarks

To match a percentage instead, set TTMSFNCDataGridFormatRuleItem.RankIsPercent and then TTMSFNCDataGridFormatRuleItem.RankCount on the returned rule. Chain TTMSFNCDataGridFormatRuleItem.ForEntireRow to highlight the whole row.

Parameters

Name Description
AColumn Zero-based column index the rule applies to.
AKind Whether to match the highest or lowest values.
ACount The number of values to match; negative values are clamped to 0.

Returns

The newly added rule, owned by the collection.