Fetch tasklist from gantt chart

How can i fetch updated tasklist from gantt chart in EJ1?

Description: Steps
1) Fetch data from database & load gantt chart.
2) Gantt will automatically rearrange data (shift task with respect to provided relations) in auto scheduling mode.
3) I want to fetch updated data in step 2 from gantt chart.

 

3 Replies 1 reply marked as answer

MS Monisha Sivanthilingam Syncfusion Team March 24, 2021 09:20 AM UTC

Hi Jignesh, 
 
Thank you for contacting Syncfusion support. 
 
We would like to inform you that we do not have support to fetch the updated data in Gantt chart during load time because we are processing the date manipulation and data validation for each record values. Hence, we can’t find whether it is modified data or not. But, it is possible on dynamic data changes via events. 
 
Please let us know, if you need any further assistance. 
 
Regards, 
Monisha. 



JI Jignesh March 24, 2021 12:03 PM UTC

Hi Monisha,

Thanks for update.

Can we fetch all task's data after gantt load ? 
We are already using events on data changes.But, we wanted to fetch all data after completion of all the internal process(syncfusion functionalities for gantt load) for loading data.


MS Monisha Sivanthilingam Syncfusion Team March 25, 2021 01:24 PM UTC

Hi Jignesh, 
 
You are welcome. 
 
Yes, we can fetch the data after the gantt loads through the dataBound event. We can the currentViewData, which contains the updated data through the dataBound event. The following code snippets demonstrate the solution. 
 
App.component.html 
<div class="control-section"> 
  <ejs-gantt #gantt id="SelfData" height="430px" [dataSource]="data" [taskFields]="taskSettings" [allowSelection]="true" 
    [labelSettings]="labelSettings" [treeColumnIndex]="1" [columns]="columns" [splitterSettings]="splitterSettings" 
    [projectStartDate]="projectStartDate" [projectEndDate]="projectEndDate" [highlightWeekends]="true" 
    (dataBound)="dataBound()"> 
  </ejs-gantt> 
</div> 
 
App.component.ts 
dataBound(args: any) { 
    console.log(this.ganttObj.currentViewData); 
  } 
 
We have also prepared a sample for your reference. 
 
Note: If you have enabled VirtualScroll in your application, only the records in the current view will be available in currentViewData. Only on scrolling further, will the currentViewData be updated with all the data. 
 
Please contact us if you require any further assistance. 
 
Regards, 
Monisha. 


Marked as answer
Loader.
Up arrow icon