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.
Unfortunately, activation email could not send to your email. Please try again.

Resource View with predecessor lines, is it possible?

Thread ID:





132590 Sep 11,2017 04:52 AM Sep 15,2017 08:22 AM WPF 3
Tags: GanttControl
Sandor Szaveljev
Asked On September 11, 2017 04:52 AM

Hi all,

I've just checked the WPF Gantt chart samples coming with the installation, and what I need in my current project is similar to the Resource View example, so it was quite useful, the only thing I need additionally is to show the predecessor lines in the Resource view.
(I'd like to visually represent resource utilization, where the resources are the machines and the nodes are the invididual steps of production orders, obviously each step depends on the previous step, that's why I'd like to show predecessor lines)

I tried to add the Predecessors into the Resource View example as I see it the Essential Gantt example, however, without any success; no exceptions are thrown, nodes are displayed successfully, nodes can be moved, etc., so everything seems OK, only the Predecessor lines are not shown.

I wonder if it's possible to implement this scenario? If so, how could I do that?

Thanks in advance for the help

Vignesh Ramesh [Syncfusion]
Replied On September 12, 2017 08:14 AM

Hi Sandor, 

Thanks for contacting Syncfusion Support. 

We have analyzed your requirement. Please provide more information on this probably a pictorial representation most appreciable one, so that we can serve you with better solution. 

Vignesh R. 

Sandor Szaveljev
Replied On September 14, 2017 08:11 AM

Hi Vignesh,

thank you for your help, ok, let me detail the situation.
Here is a snapshot of the Resource View example, where more than one task nodes are displayed in a row:

And here's a snapshot from the Essential Gantt example, I marked the precessor lines with red:

What I'd like to achieve is basically the Resource View above, but I'd also like to display Predecessor lines between certain task nodes to indicate their relation.

I tried to achieve that by modifying the Resource View example:
1. added TaskId and Predecessor mapping into the XAML markup:
<gantt:TaskAttributeMapping TaskIdMapping="TaskId"

2. Added TaskId and Predecessor properties to the Item class:
public int TaskId
                return _taskId;
                _taskId = value;

public ObservableCollection<Predecessor> Predecessor
                return _predecessor;
                _predecessor = value;

                _predecessor.CollectionChanged += ItemsCollectionChanged;



3. Changed the  ViewModel construction by additionally setting TaskIds and Predecessors:
Item Person = new Item() { TaskId = 100101, TaskName = "Robert" };
Person.InLineItems.Add(new Item() { TaskId = 1, StartDate = new DateTime(2012, 01, 07), FinishDate = new DateTime(2012, 01, 11),TaskName = "Market Analysis", Progress = 50d });
 Person.InLineItems.Add(new Item() { TaskId = 2, StartDate = new DateTime(2012, 01, 11,12,0,0), FinishDate = new DateTime(2012, 01, 17),TaskName = "Competitor Analysis", Progress = 20d });
Person.InLineItems.Add(new Item() { TaskId = 3, StartDate = new DateTime(2012, 01, 17,12,0,0), FinishDate = new DateTime(2012, 01, 21),TaskName = "Design Spec" });

Person = new Item() { TaskId = 100102, TaskName = "Michael" };
Person.InLineItems.Add(new Item() { TaskId = 4, StartDate = new DateTime(2012, 01, 14), FinishDate = new DateTime(2012, 01, 19),TaskName = "Basic Requirement Analysis", Progress = 40 });
Person.InLineItems[0].Predecessor.Add(new Predecessor { GanttTaskIndex = 1, GanttTaskRelationship = GanttTaskRelationship.FinishToStart });

Now, I expected the Resource View to draw these Predecessor lines on the diagram, however, it does not.
There are no exceptions thrown, everything works, dragging, resizing nodes, etc., only the Predecessor lines are not displayed.

(In the attachment you can find the CS solution zipped)

Hope this helps,
Thanks in advance for your help,

Attachment: CS_356e410d.ZIP

Vignesh Ramesh [Syncfusion]
Replied On September 15, 2017 08:22 AM

Hi Sandor, 
Thanks for the update. 
Currently we don’t have support to establish relations between two Inline nodes in the resource view. We considered this requirement as a feature and It will be included in any of our upcoming release. 
Vignesh R. 


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.

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.