Skip to main content
All docs
V24.1

ASPxClientGantt.TaskInserted Event

Occurs after a user inserted a task.

Declaration

TaskInserted: ASPxClientEvent<ASPxClientGanttTaskInsertedEventHandler<ASPxClientGantt>>

Event Data

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

Property Description
key Specifies the task key.
values Specifies the task values.

Remarks

Gantt - Subtasks

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:

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

MVC:

@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