aspnet-js-aspxclientgantt-6104cf44.md
Occurs after a user inserted a task.
TaskInserted: ASPxClientEvent<ASPxClientGanttTaskInsertedEventHandler<ASPxClientGantt>>
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. |
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()
See Also