Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ResourceView: Dependencies between Resources (Read 6358 times)
Achim
Junior Member
**
Offline


MindFusion rocks!

Posts: 70
Location: Bayreuth, Germany
Joined: Jun 28th, 2012
ResourceView: Dependencies between Resources
Jul 3rd, 2012 at 8:31am
Print Post  
Hi there,

so I created a ResourceView with grouped Resources (see attached screenshot). There are five Producers and five Consumers. Now I want to take care of the connections between these resources.

For example: Producer 0 is connected with Consumer 5 and Consumer 7. So I want in the group of Producer 0 only to see Consumer 5 & 7. Producer 1 is connected with Consumer 6 only. So I only want to have Consumer 6 in the line of Producer 1.

Is there any way to achieve this? For my project this is absolutely vital because we have about 20 Consumers and 50 Producers - so the chart would have about 1000 Lanes that are mostly empty...

Many thanks in advance
Achim
  

Bildschirmfoto_2012-07-03_um_10_24_05.png (Attachment deleted)
Back to top
WWW  
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: ResourceView: Dependencies between Resources
Reply #1 - Jul 3rd, 2012 at 10:13am
Print Post  
This is not currently possible (grouping is unconditional), but I will check if it can be added as a feature and get back to you.

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


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: ResourceView: Dependencies between Resources
Reply #2 - Jul 3rd, 2012 at 12:00pm
Print Post  
I've made some modifications to the control to allow additional customization of the secondary resources. To do this, handle the new Calendar.CustomizeGrouping event and modify the GroupByResources property of the event argument. A sample illustrating this can be downloaded from here.

This new functionality hasn't been tested much, so keep an eye for possible bugs.

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


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: ResourceView: Dependencies between Resources
Reply #3 - Jul 3rd, 2012 at 12:28pm
Print Post  
I forgot to mention that this version should also fix the bug discussed here.

Regards,
Meppy
  
Back to top
 
IP Logged
 
Achim
Junior Member
**
Offline


MindFusion rocks!

Posts: 70
Location: Bayreuth, Germany
Joined: Jun 28th, 2012
Re: ResourceView: Dependencies between Resources
Reply #4 - Jul 3rd, 2012 at 12:32pm
Print Post  
Hi Meppy,

thank you very much. It seems to work fine. I'll try it in my scenario and have an eye on it regarding bugs etc...

Once again: thanks a lot!
Achim
  
Back to top
WWW  
IP Logged
 
Achim
Junior Member
**
Offline


MindFusion rocks!

Posts: 70
Location: Bayreuth, Germany
Joined: Jun 28th, 2012
Re: ResourceView: Dependencies between Resources
Reply #5 - Jul 9th, 2012 at 2:21pm
Print Post  
Hi Meppy,

I'm back again Smiley CustomizeGrouping seems to work fine so far. One thing I found a little bit strange: when I add 5 TypeA-Resources and 5 TypeB-Resources the Event-Handler is called exactly 100 times. I think it should be called only once per parent which is in this case 5 times. Is this the intended way it should work?

Best regards
Achim
  
Back to top
WWW  
IP Logged
 
Achim
Junior Member
**
Offline


MindFusion rocks!

Posts: 70
Location: Bayreuth, Germany
Joined: Jun 28th, 2012
Re: ResourceView: Dependencies between Resources
Reply #6 - Jul 9th, 2012 at 2:25pm
Print Post  
Hi Meppy,

one more thing: neither Calendar.Invalidate() nor Calendar.Refresh() seem to redraw the control. It could help alot to have a method that triggers the CustomizeGrouping again - e.g. when connections between resources change (and nothing else).

My current solution is to copy the resource collection, clear it and copy each item back. Seems to be a little bit ugly Smiley

Best regards
Achim
  
Back to top
WWW  
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: ResourceView: Dependencies between Resources
Reply #7 - Jul 9th, 2012 at 2:47pm
Print Post  
Hi,

I think calling BeginInit/EndInit in a succession after changing the dependencies will rebuild the entire view:

Code
Select All
calendar.BeginInit();
calendar.EndInit(); 


It is still not straightforward, but its better than recreating the resource collection.

Regarding the CustomizeGrouping event being called multiple times, it might be a result of the view being rebuilt after the assignment of various properties. Wrapping the initialization code in a BeginInit/EndInit block will prevent the view from rebuilding multiple times.

I hope this helps.

Regards,
Meppy
  
Back to top
 
IP Logged
 
Achim
Junior Member
**
Offline


MindFusion rocks!

Posts: 70
Location: Bayreuth, Germany
Joined: Jun 28th, 2012
Re: ResourceView: Dependencies between Resources
Reply #8 - Jul 10th, 2012 at 6:48am
Print Post  
Thanks Meppy, I'll give it a try and report again.

Achim
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint