We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Gantt chart - Raising an event

Thread ID:

Created:

Updated:

Platform:

Replies:

145952 Jul 15,2019 07:30 PM UTC Jul 17,2019 01:42 PM UTC Angular - EJ 2 4
loading
Tags: Gantt Chart
Joubin Najmaie
Asked On July 15, 2019 07:30 PM UTC

Hi,

How do you raise an event such as 'resizing' or 'resizeStart'/'resizeEnd'?

Here is the angular template:

<ejs-gantt id="ganttDefault" [dataSource]="data" [taskFields]="taskSettings" [columns]="columns"
[timelineSettings]="timelineSettings" [labelSettings]="labelSettings" [treeColumnIndex]="1"
[allowSelection]="true" dateFormat="MMM dd, y" [projectStartDate]="projectStartDate" [projectEndDate]="projectEndDate" [highlightWeekends]="false"
[gridLines]="gridLines" [eventMarkers]="eventMarkers" [editSettings]="editSettings"
[toolbar]="toolbar" [baselineColor]='orange' [renderBaseline]="true" [includeWeekend]="true" (resizeStart)='resizeStarted($event)'>

Here is the component code:
resizeStarted($event) {
console.log('resizing started')
}

Thanks.

Joubin Najmaie
Replied On July 15, 2019 08:56 PM UTC

I got a few other events firing, however I'm looking for a particular event for change of the startdate or enddate of a task.
Which event is this?

Thanks.

Jesus Arockia Sankaran S [Syncfusion]
Replied On July 16, 2019 11:33 AM UTC

Hi Joubin, 
 
Please find the details below. 
 
No 
Query 
Syncfusion Comments 
1 
How do you raise an event such as 'resizing' or 'resizeStart'/'resizeEnd'? 
These events are get triggered on column resizing action respectively the resizeStart event gets triggered when the column resize starts, the resizing event gets triggered on resizing, and resizeStop event gets triggered when column resize ends. 
 
2 
I'm looking for a particular event for change of the startdate or enddate of a task. Which event is this? 
While changing the start date and end date, by resizing the taskbar, taskbarEditing event gets triggered. In the taskbarEditing event argument we will get the parameter called taskBarEditAction. While changing the start date the taskBarEditAction value will be LeftResizing. While changing the end date its value will be RightResizing. Using this value we can differentiate which value will be changes on taskbar resize and drag actions. 
 
On cell edit action, cellEdit event gets triggered, cellEdit event argument has the parameter named columnName. Using this parameter we can find which column will be edited. 
 
Can you please share your requirement that you want to achieve on this events? 
 
 
 
 
We ask you to get back to us if you require further assistance on this. 
 
Regards, 
Jesus Arockia Sankaran S 


Joubin Najmaie
Replied On July 16, 2019 02:43 PM UTC

Thanks Jesus!

So far I've figured out the following:
  1. taskbarEdited: use this event for when a task is expanded or contracted.
  2. actionComplete: is a generic event fired on all actions.
I still don't know the event fired on dragging a dependency line between two tasks.

Can you please help me with that?

Thanks!

Jesus Arockia Sankaran S [Syncfusion]
Replied On July 17, 2019 01:42 PM UTC

Hi Joubin, 
 
Please find the response below. 
 
In Gantt, we can track the predecessor draw action by using actionBegin event. This event  will be triggered before drawing the connector lines with requestType argument value as ValidateDependency. 
And the actionComplete event will be triggered after successful creation of connector lines with requestType argument value as save. 
 
Please get back to us if you require further assistance on this. 
 
Regards, 
Jesus Arockia Sankaran S 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon