Back to Devexpress

ASPxClientGantt.TaskInserted Event

aspnet-js-aspxclientgantt-6104cf44.md

latest2.3 KB
Original Source

ASPxClientGantt.TaskInserted Event

Occurs after a user inserted a task.

Declaration

ts
TaskInserted: ASPxClientEvent<ASPxClientGanttTaskInsertedEventHandler<ASPxClientGantt>>

Event Data

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

PropertyDescription
keySpecifies the task key.
valuesSpecifies the task values.

Remarks

Use the TaskInserted event to process task data when a task is inserted.

Run Demo: ASPxGantt - Client-Side Events Run Demo: MVCxGantt - Client-Side Events

Web Forms:

aspx
<dx:ASPxGantt ID="Gantt" >
    <ClientSideEvents TaskInserted="function(s, e) {
        e.values["Subject"] = "Custom Task Name";
    }" />
</dx:ASPxGantt>

MVC:

cshtml
@Html.DevExpress().Gantt(settings => {
    settings.Name = "gantt";
    settings.ClientSideEvents.TaskInserted = "function (s, e) { 
        e.values["Subject"] = "Custom Task Name";
    }";
    ...
}).Bind(
    GanttDataProvider.Tasks, GanttDataProvider.Dependencies, 
    GanttDataProvider.Resources, GanttDataProvider.ResourceAssignments
).GetHtml()

Concepts

See Also

InsertTask(data)

ASPxGantt - Overview

MVCxGantt - Overview

ASPxGantt - 'How To' Examples

MVCxGantt - 'How To' Examples

ASPxClientGantt Class

ASPxClientGantt Members