Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Grouping and showing Links between Tasks (Read 8884 times)
Parag Somani
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 8
Joined: Jun 6th, 2012
Grouping and showing Links between Tasks
Jun 6th, 2012 at 6:02am
Print Post  
Hi,
I am in the requirement to show a Gantt View in which I could show multiple Tasks on calendar against resources on the left pane.
Also the tasks may contain sub tasks.
And somehow we need to link sub tasks through visible arrows or something else sothat we could express Predecessor and Successor tasks.
Thanks,
Parag Somani
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Grouping and showing Links between Tasks
Reply #1 - Jun 6th, 2012 at 8:25am
Print Post  
Hi,

We do not offer a native WinForms Gannt component, but you can easily integrate our WPF Gannt charts in a WinForms application by using the ElementHost control. The following example demonstrates how:

Code
Select All
ElementHost host = new ElementHost();
host.Dock = DockStyle.Fill;
host.Child = new ActivityChart();
Controls.Add(host); 


More information about the ElementHost control can be found here.

I hope this helps.

Regards,
Meppy
  
Back to top
 
IP Logged
 
Parag Somani
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 8
Joined: Jun 6th, 2012
Re: Grouping and showing Links between Tasks
Reply #2 - Jun 6th, 2012 at 12:29pm
Print Post  
Hi Meppy,
Actually I could not find a sample/code for links/dependencies even in MindFusion Scheduling for WPF. Undecided
With regards,
Parag Somani
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Grouping and showing Links between Tasks
Reply #3 - Jun 6th, 2012 at 12:59pm
Print Post  
Hi,

You can take a look at the CustomAppearance and Demo samples or any of the tutorials 2-4 to see how you can use the built-in Activity and Dependency objects to create a Gantt chart. If you need to display custom objects, check Tutorial #5.

Basically, to create a Gantt chart using the built-in Activity and Dependency objects, you would write code similar to the following one:

Code
Select All
// Initialize the activities and dependencies collections.
ObservableCollection<Activity> activities = new ObservableCollection<Activity>();
ObservableCollection<Dependency> dependencies = new ObservableCollection<Dependency>();

// Create some activities and add them to the respective collection.
Activity a0 = new Activity()
{
	StartTime = DateTime.Today,
	EndTime = DateTime.Today,
	Progress = 1,
	ActivityName = "Project start"
};
activities.Add(a0);

Activity a1 = new Activity()
{
	StartTime = a0.EndTime,
	EndTime = a0.EndTime.AddDays(6),
	Progress = 1,
	ActivityName = "Task 1"
};
activities.Add(a1);

// Create some dependencies between the activities.
dependencies.Add(new Dependency() { From = a0, To = a1, DependencyType = DependencyType.FinishToStart });

// Create the project.
IProjectViewModel project = activityView.CreateViewModel(activities, dependencies, null, null, typeof(Activity), typeof(Dependency), null, null); 


I hope this helps.

Regards,
Meppy
  
Back to top
 
IP Logged
 
Parag Somani
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 8
Joined: Jun 6th, 2012
Re: Grouping and showing Links between Tasks
Reply #4 - Jun 6th, 2012 at 1:06pm
Print Post  
Hi Meppy,
I should really thank for how quickly you respond.
Soon I'll go through code you've explained.

With Regards,
Parag
  
Back to top
 
IP Logged
 
Parag Somani
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 8
Joined: Jun 6th, 2012
Re: Grouping and showing Links between Tasks
Reply #5 - Jun 6th, 2012 at 1:46pm
Print Post  
I saw Tutorial#5 for WPF,
But can I have the databound dependencies and activities from a dataset, and then update there only?
As per example I have to set dependencies individually for each activity.

With regards,
Parag Somani
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Grouping and showing Links between Tasks
Reply #6 - Jun 7th, 2012 at 7:11am
Print Post  
Hi Parag,

I am currently working on a solution and will get back to you shortly.

Regards,
Meppy
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Grouping and showing Links between Tasks
Reply #7 - Jun 8th, 2012 at 3:20pm
Print Post  
Hello again,

I had to make some modifications to the control in order to make it bindable to a database. A small sample illustrating how to perform binding to a MS Access database can be downloaded from here. The updated dlls can also be found inside.

Please, have a look at the sample and let me know if you have further questions.

Regards,
Meppy
  
Back to top
 
IP Logged
 
Parag Somani
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 8
Joined: Jun 6th, 2012
Re: Grouping and showing Links between Tasks
Reply #8 - Jun 11th, 2012 at 5:48am
Print Post  
Thanks for the efforts and i'll go through the updated dlls/sample
  
Back to top
 
IP Logged
 
Parag Somani
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 8
Joined: Jun 6th, 2012
Re: Grouping and showing Links between Tasks
Reply #9 - Jul 2nd, 2012 at 10:09am
Print Post  
Hi,
Sorry I was out of this as I was assigned a different task,
The DLLs you provided are serving nice,but one more thing,
I have one table with actiivties that contains resource Id as well. Shall I use Activity and Alocation both with same table as source?

Parag Somani
  
Back to top
 
IP Logged
 
Parag Somani
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 8
Joined: Jun 6th, 2012
Re: Grouping and showing Links between Tasks
Reply #10 - Jul 2nd, 2012 at 10:27am
Print Post  
Hi,
Sorry I was out of this as I was assigned a different task,
The DLLs you provided are serving nice,but one more thing,
I have one table with actiivties that contains resource Id as well. Shall I use Activity and Alocation both with same table as source?
Plus what are the main differences between using a WPF Calendar vs WPF Chart

Parag Somani
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Grouping and showing Links between Tasks
Reply #11 - Jul 2nd, 2012 at 11:26am
Print Post  
I don't think that using the same table as activity and allocation source will work.

Regarding the differences between the Gantt charts and Calendar:
* They use different data models - the Calendar uses a built-in Schedule object; the Gantt chart uses a more flexible ViewModel;
* They offer different views - the Calendar offers several view layouts; whereas the Gantt chart offers only a single view type;
* The Gantt charts support hierarchical activities;
* The Gantt charts provide more information about the displayed items through an editable grid;
* The Gantt charts support dependencies between activities;

Regards,
Meppy
  
Back to top
 
IP Logged
 
Parag Somani
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 8
Joined: Jun 6th, 2012
Re: Grouping and showing Links between Tasks
Reply #12 - Jul 2nd, 2012 at 1:49pm
Print Post  
Thanks,

I am going with following code, but getting 'Object reference not set to an instance of an object'
at Chart.CreateViewModel.
I confirmed that chart,mobjProcessCellList, mobjAllocations are not null

Please Identify any code issues

'===============================================================================
=========================
  Dim chart As New ResourceChart()

chart.AllocationActivityExpression = "BatchNo"
        chart.AllocationStartTimeExpression = "DateFrom"
        chart.AllocationEndTimeExpression = "DateTo"
        chart.AllocationResourceExpression = "ProcessCellId"
        chart.AllocationProgressExpression = "AllocId"

chart.ResourceTitleExpression = "ProcesCellId"
        chart.ResourceDescriptionExpression = "Description"



vm = chart.CreateViewModel(Nothing, Nothing, mobjProcessCellList, mobjAllocations, Nothing, Nothing, _
          GetType(ProcessCell), GetType(ProductionProcessCellAlloc))


'===============================================================================
============================
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Grouping and showing Links between Tasks
Reply #13 - Jul 2nd, 2012 at 2:49pm
Print Post  
The ResourceChart cannot be used without specifying an activity source. In addition, the AllocationResourceExpression and AllocationActivityExpression must identify properties returning a reference to the resource and activity objects related to the allocation. If the properties in question do not return references to the objects (for example if those properties return an ID or an index), you have to supply an ExpressionConverter to convert those IDs or indices to the respective objects.

Regards,
Meppy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint