A newer version of this page is available. Switch to the current version.

MVCxGridViewFormatConditionCollection.AddHighlight(String, String, GridConditionHighlightFormat) Method

Creates a new format condition item with the specified settings and adds it to the MVCxGridViewFormatConditionCollection collection.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v18.2.dll


public GridViewFormatConditionHighlight AddHighlight(
    string fieldName,
    string expression,
    GridConditionHighlightFormat format
Public Function AddHighlight(
    fieldName As String,
    expression As String,
    format As GridConditionHighlightFormat
) As GridViewFormatConditionHighlight


Name Type Description
fieldName String

A String value that is the name of the processed data field. This value is assigned to the GridFormatConditionBase.FieldName property.

expression String

A String value specifying the expression used to format grid cells. This value is assigned to the GridFormatConditionHighlight.Expression property.

format GridConditionHighlightFormat

One of the GridConditionHighlightFormat enumeration values specifying the format (color scale) applied to cells. This value is assigned to the GridFormatConditionExpressionBase.Format property.


Type Description

An GridViewFormatConditionHighlight object that is the newly created format condition item.

See Also