Skip to main content
All docs
V23.2

ASPxClientGanttTaskEventArgs.key Property

Returns the task key.

Declaration

key: any

Property Value

Type Description
any

The task key.

Remarks

Web Forms:

<dx:ASPxGantt ID="Gantt" >
    <ClientSideEvents 
        TaskClick="function(s, e) {
            if (e.key == 5) {
                //...
                e.cancel = true;
            }
        }" 
        TaskDblClick="function(s, e) {
            if (e.key == 10) {
                //...
                e.cancel = true;
            }
        }"    
    />
</dx:ASPxGantt>

MVC:

@Html.DevExpress().Gantt(settings => {
    settings.Name = "gantt";
    settings.ClientSideEvents.TaskClick = "function (s, e) { 
        if (e.key == 5) {
            //...
            e.cancel = true;
        }      
    }";
    settings.ClientSideEvents.TaskDblClick = "function (s, e) { 
        if (e.key == 10) {
            //...
            e.cancel = true;
        }     
    }";
    ...
}).Bind(
    GanttDataProvider.Tasks, GanttDataProvider.Dependencies, 
    GanttDataProvider.Resources, GanttDataProvider.ResourceAssignments
).GetHtml()

Note

The key should have the same format as used in the data source field.

See Also