Skip to main content

ASPxClientGanttCustomCommandEventArgs Class

Provides data for the CustomCommand event.

Declaration

declare class ASPxClientGanttCustomCommandEventArgs extends ASPxClientEventArgs

Remarks

Run Demo: ASPxGantt - Toolbar Run Demo: MVCxGantt - Toolbar

Web Forms:

<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>

MVC:

@Html.DevExpress().Gantt(settings => {
    settings.Name = "gantt";
    settings.SettingsToolbar.Items.AddCustomItem(i => {
        i.Checked = true;
        i.Text = "Show Resources";
        i.CommandName = "ShowResources";
    });    
    settings.ClientSideEvents.CustomCommand = "function (s, e) { 
        if(e.commandName == 'Toggle') {
            clientGantt.ShowResources(e.parameter);
        }      
    }";
    ...
}).Bind(
    GanttDataProvider.Tasks, GanttDataProvider.Dependencies, 
    GanttDataProvider.Resources, GanttDataProvider.ResourceAssignments
).GetHtml()

Examples

Inheritance

ASPxClientEventArgs
ASPxClientGanttCustomCommandEventArgs
See Also