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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Resource View with predecessor lines, is it possible?

Thread ID:

Created:

Updated:

Platform:

Replies:

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

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 12:14 PM UTC

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. 

Regards, 
Vignesh R. 


Sandor Szaveljev
Replied On September 14, 2017 12:11 PM UTC

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"
                                                TaskNameMapping="TaskName"
                                                StartDateMapping="StartDate" 
                                                ChildMapping="Child"
                                                FinishDateMapping="FinishDate"
                                                ProgressMapping="Progress"
                                                InLineTaskMapping="InLineItems"
                                                PredecessorMapping="Predecessor"/>

2. Added TaskId and Predecessor properties to the Item class:
public int TaskId
        {
            get
            {
                return _taskId;
            }
            set
            {
                _taskId = value;
                RaisePropertyChanged("TaskId");
            }
        }

public ObservableCollection<Predecessor> Predecessor
        {
            get
            {
                return _predecessor;
            }
            set
            {
                _predecessor = value;

                _predecessor.CollectionChanged += ItemsCollectionChanged;

                UpdateDates();

                this.RaisePropertyChanged("Predecessor");
            }
        }

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" });
teams.Add(Person);

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,
Sandor

Attachment: CS_356e410d.ZIP

Vignesh Ramesh [Syncfusion]
Replied On September 15, 2017 12:22 PM UTC

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. 
 
Regards, 
Vignesh R. 


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.

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

;