I'm using syncfusion gantt chart in my angular project, and I'm using it's default toolbar for adding the new task.
Now I want to call API on the click of save button on Dialog (and want that modal data as well).
So How should I achieve that in Angular.
|
<ejs-gantt id="ganttDefault" height="430px" [dataSource]="data" [taskFields]="taskSettings" [columns]="columns"
[labelSettings]="labelSettings" [treeColumnIndex]="1" height="450px" [allowSelection]="true"
dateFormat="MMM dd, y" [projectStartDate]="projectStartDate" [projectEndDate]="projectEndDate"
[highlightWeekends]="true" [editSettings]="editSettings" [toolbar]="toolbar"
[splitterSettings]="splitterSettings" (actionComplete)="actionComplete($event)" (toolbarClick)="toolbarClick($event)">
</ejs-gantt>
|
|
public toolbarClick(args: any) {
if (args.item.text == 'Add') {
this.dialog = true;
}
}
public actionComplete(args: any) {
if (args.requestType == 'add' && this.dialog) {
alert('Save button clicked');
console.log(args.newTaskData);
this.dialog = false;
}
}
|
Thanks "Monisha Sivanthilingam" for your support, I got my answer.