GridFormatConditionTopBottom.Threshold Property
Allows you to provide additional information for the current rule.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
Declaration
Property Value
Type | Default | Description |
---|---|---|
Decimal | 10 | A Decimal value specifying the number or percent of cells. |
Remarks
The Threshold property allows you to provide additional information for the current rule specified by the GridFormatConditionTopBottom.Rule property.
- When the GridFormatConditionTopBottom.Rule property is set to BottomItems or TopItems, use the Threshold property to specify the number of bottom or top items to which the formatting will be applied.
- When the GridFormatConditionTopBottom.Rule property is set to BottomPercent or TopPercent, use the Threshold property to specify the percent of bottom or top items to which the formatting will be applied.
Note
The top and bottom items are determined according to the ascending sort order.
Example
...
{
CardViewFormatConditionColorScale Format1 = new CardViewFormatConditionColorScale();
Format1.FieldName = "Discount";
Format1.Format = GridConditionColorScaleFormat.GreenYellow;
Format1.MinimumValue = 0.15;
Format1.MaximumValue = 0.25;
CardViewFormatConditionHighlight Format2 = new CardViewFormatConditionHighlight();
Format2.Format = GridConditionHighlightFormat.Custom;
Format2.CardStyle.BackColor = Color.Orange;
Format2.ApplyToCard = true;
Format2.Rule = GridConditionRule.Expression;
Format2.Expression = "[Quantity] < 50";
Format2.FieldName = "Quantity";
CardViewFormatConditionTopBottom Format3 = new CardViewFormatConditionTopBottom();
Format3.FieldName = "UnitPrice";
Format3.Format = GridConditionHighlightFormat.BoldText;
Format3.Rule = GridTopBottomRule.TopItems;
Format3.Threshold = 10;
ASPxCardView1.FormatConditions.Add(Format1);
ASPxCardView1.FormatConditions.Add(Format2);
ASPxCardView1.FormatConditions.Add(Format3);
}
See Also