Skip to main content
Tab

CardViewFormatConditionColorScale.ShowInColumn Property

Gets or sets a value that specifies a column to which the current conditional formatting will be applied.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue("")]
public string ShowInColumn { get; set; }

Property Value

Type Default Description
String String.Empty

A String value that identifies the data column in the ASPxCardView by its unique identifier name (WebColumnBase.Name), the name of the data source field to which it is bound (CardViewColumn.FieldName), or the column caption (WebColumnBase.Caption).

Remarks

The ASPxCardView supports conditional formatting, i.e., automatically applies cell formatting based on the specified rules.

Use the ShowInColumn property to specify the column to which the current conditional formatting will be applied. If the ShowInColumn property isn’t specified, the formatting is applied to a column specified by the GridFormatConditionBase.FieldName property.

Note

This is the priority when using string column identifiers in searching for a column:

  • First, the Name property match is searched for.
  • Then, the first FieldName property match is searched for.
  • Last, the first Caption property match is searched for.

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