Predecessor
Hi,
is there the possibility to retrieve the predecessor of a task after the predecessor is done in gantt chart?
Best regards
Gian Piero Truccolo
SIGN IN To post a reply.
5 Replies
1 reply marked as answer
VR
Vignesh Ramesh
Syncfusion Team
March 29, 2021 12:18 PM UTC
Hi Gian Piero Truccolo,
Greetings from Syncfusion.
We have analyzed your query, but we could not be able to understand what ‘’after the predecessor is done in Gantt chart’’ means. So, could you please provide some more information about your requirement, it will help us to proceed further.
Regards,
Vignesh Ramesh.
GI
Gian
March 29, 2021 12:23 PM UTC
Hi,
i exaplain here what i mean.
we don't use gantt grid and the user will create the predecessor in gantt chart.
After creates a predecessor we would like to use this for calculating other data.
So i ask you if exist an event after the action is complete.
Best regards
Gian Piero Truccolo
SS
Sridevi Sivakumar
Syncfusion Team
March 30, 2021 12:24 PM UTC
Hi Gian Piero Truccolo,
Thanks for your update.
We have analyzed your requirement and we would like to inform you that you can get the predecessor details in load time with Gantt control Loaded event as per the below code snippet.
Code snippet [XAML]:
Thanks for your update.
We have analyzed your requirement and we would like to inform you that you can get the predecessor details in load time with Gantt control Loaded event as per the below code snippet.
Code snippet [XAML]:
|
<gantt:GanttControl x:Name="Gantt" Loaded="Gantt_Loaded"
ItemsSource="{Binding TaskCollection}"
UseAutoUpdateHierarchy="False"
VisualStyle="Metro">
<gantt:GanttControl.TaskAttributeMapping>
<gantt:TaskAttributeMapping TaskIdMapping="Id"
TaskNameMapping="Name"
StartDateMapping="StDate"
ChildMapping="ChildTask"
FinishDateMapping="EndDate"
DurationMapping="Duration"
ResourceInfoMapping="Resource"
ProgressMapping="Complete"
PredecessorMapping="Predecessor"/>
</gantt:GanttControl.TaskAttributeMapping>
</gantt:GanttControl> |
[C#]:
|
private void Gantt_Loaded(object sender, RoutedEventArgs e)
{
var predecessor= ((model.TaskCollection)[0] as Task).ChildTask[1].Predecessor;
} |
Note : In dynamic time, we don't have event notification support for predecessor changes.
Let us know if you need any further assistance.
Regards,
Sridevi S.
Let us know if you need any further assistance.
Regards,
Sridevi S.
GI
Gian
March 30, 2021 03:30 PM UTC
Hi,
could you add tthe event for the next release?
Best reagards
Gian Piero Truccolo
MK
Muneesh Kumar G
Syncfusion Team
March 31, 2021 11:55 AM UTC
Hi Gian Piero Truccolo,
Sorry for the inconvenience caused,
Already our Gantt control has event support to identify the predecessor relation establishment through GanttChart dynamically. You can get the Predecessor by using RelationshipEstablished event in gantt control. Please find the code snippet below
XAML:
|
<syncfusion:GanttControl x:Name="Gantt"
RelationshipEstablished="Gantt_RelationshipEstablished">
<syncfusion:GanttControl.TaskAttributeMapping>
…
</syncfusion:GanttControl.TaskAttributeMapping>
</syncfusion:GanttControl> |
C#:
|
private void Gantt_RelationshipEstablished(object sender, GanttRelationshipEstablishedEventArgs e)
{
var predecessorCollection = (e.EndTask as TaskDetails).Predecessor;
} |
We hope it helps you.
Thanks,
Muneesh Kumar G
Marked as answer
SIGN IN To post a reply.