All docs
V20.2
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
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.

ASPxClientGantt.CustomCommand Event

Enables you to implement a custom command's logic.

Declaration

CustomCommand: ASPxClientEvent<ASPxClientGanttCustomCommandEventHandler<ASPxClientGantt>>

Event Data

The CustomCommand event's data class is ASPxClientGanttCustomCommandEventArgs. The following properties provide information specific to this event:

Property Description
commandName Specifies the command name for a custom toolbar item.
parameter Gets an optional parameter that complements the processed command.

Remarks

You can use the CustomCommand event to handle clicks on custom toolbar and context menu items.

<dx:ASPxGantt ID="Gantt" ClientInstanceName="clientGantt" >
    <SettingsToolbar>
        <Items>
            <dx:GanttCustomToolbarItem Checked="True" Text="Show Resources" CommandName="Toggle" />
        </Items>
    </SettingsToolbar>
    <ClientSideEvents CustomCommand="function(s, e) {
        if(e.commandName == 'Toggle') {
            clientGantt.ShowResources(e.parameter);
        }
    } />
</dx:ASPxGantt>

Run Demo: (Web Forms) Gantt Toolbar

Run Demo: (MVC) Gantt Toolbar

Examples

See Also