All docs
V19.2
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

ASPxClientUtils.ToggleClassName(element, className, toggleState) Method

Adds or removes a class name to an element.

Declaration

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

Parameters

Name Type Description
element any

The element.

className string

The class name.

toggleState boolean

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

Remarks

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" >
    <Columns>
        //...
        <dx:GridViewDataTextColumn FieldName="Total" UnboundType="Decimal" UnboundExpression="[UnitPrice] * [Quantity] * (1 - [Discount])" />
    </Columns>
    <SettingsEditing Mode="Batch" />
    <ClientSideEvents BatchEditSummaryDisplayText="onBatchEditSummaryDisplayText" />
    <TotalSummary>
        <dx:ASPxSummaryItem FieldName="Total" SummaryType="Sum" />
    </TotalSummary>
    <GroupSummary>
        <dx:ASPxSummaryItem FieldName="Total" SummaryType="Sum" />
    </GroupSummary>
</dx:ASPxGridView>
See Also