Skip to main content

ASPxClientUtils.ToggleClassName(element, className, toggleState) Method

Adds or removes a class name to an element.


static ToggleClassName(
    element: any,
    className: string,
    toggleState: boolean
): void


Name Type Description
element any

The element.

className string

The class name.

toggleState boolean

true, to add a class name; otherwise, false.


The following example illustrates how to add or delete a class name to a summary value element depending on the summary value.

<dx:ASPxGridView ID="Grid" runat="server" ClientInstanceName="grid" >
        <dx:GridViewDataTextColumn FieldName="Total" UnboundType="Decimal" UnboundExpression="[UnitPrice] * [Quantity] * (1 - [Discount])" />
    <SettingsEditing Mode="Batch" />
    <ClientSideEvents BatchEditSummaryDisplayText="onBatchEditSummaryDisplayText" />
        <dx:ASPxSummaryItem FieldName="Total" SummaryType="Sum" />
        <dx:ASPxSummaryItem FieldName="Total" SummaryType="Sum" />
See Also