Back to Devexpress

ASPxClientGantt.TaskInserting Event

aspnet-js-aspxclientgantt-4ca8b913.md

latest2.5 KB
Original Source

ASPxClientGantt.TaskInserting Event

Occurs before a user inserts a task.

Declaration

ts
TaskInserting: ASPxClientEvent<ASPxClientGanttTaskInsertingEventHandler<ASPxClientGantt>>

Event Data

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

PropertyDescription
cancelSpecifies whether to cancel the related action (for example, row edit, export). Inherited from ASPxClientCancelEventArgs.
valuesSpecifies the task values.

Remarks

Use the TaskInserting event to process task data before a task is inserted.

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

Web Forms:

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

MVC:

cshtml
@Html.DevExpress().Gantt(settings => {
    settings.Name = "gantt";
    settings.ClientSideEvents.TaskInserting = "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