Back to Devexpress

ASPxClientGantt.InsertTask(data) Method

aspnet-js-aspxclientgantt-dot-inserttask-x28-data-x29.md

latest1.6 KB
Original Source

ASPxClientGantt.InsertTask(data) Method

Inserts a new task.

Declaration

ts
InsertTask(
    data: any
): void

Parameters

NameTypeDescription
dataany

The task data.

|

Remarks

The keys should have the same format as used in the data source fields.

aspx
<dx:ASPxGantt ID="Gantt" runat="server" ClientInstanceName="clientGantt" >
    //...
</dx:ASPxGantt>
js
// Inserts a new task with the specified subject at the end of the other tasks.
clientGantt.InsertTask({ Subject: "Test task"});

// Inserts a child task with the specified subject as a child of the task with ID = 2 
clientGantt.InsertTask({ ParentID: 2, Subject: "Test task"});

Concepts

See Also

TaskInserted

TaskInserting

ASPxGantt - Overview

MVCxGantt - Overview

ASPxGantt - 'How To' Examples

MVCxGantt - 'How To' Examples

ASPxClientGantt Class

ASPxClientGantt Members