Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) multiple resource selection (Read 8565 times)
fabiogiustini
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 17
Joined: Sep 26th, 2007
multiple resource selection
Sep 26th, 2007 at 2:53pm
Print Post  
My client is an hotel and needs a room planner. So I´ve configured the calendar to timeline view putting the date on top and the resources (rooms) on the left, grouping by resource.
My need is to select an area across multiple resources in TimeLine view mode, and then create corresponding appointments via the in-place editor.

is it possible? ???
Thanks in advance  for your feedback,

Fabio
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: multiple resource selection
Reply #1 - Sep 27th, 2007 at 4:55am
Print Post  
You cannot create selection across multiple resources at the moment (neither interactively nor programmatically). One way to work around this, would be to create a checked list box with all resources. Then, when the user selects a single time interval in the Calendar control and creates an appointment, you can manually create corresponding appointments for the rest of the resources selected in the list box.

Meppy
  
Back to top
 
IP Logged
 
fabiogiustini
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 17
Joined: Sep 26th, 2007
Re: multiple resource selection
Reply #2 - Sep 27th, 2007 at 5:46am
Print Post  
Hello Meppy, thank you for feedback.

Your work around is good solution! In that case, is possible highlight the resources I’ve selected in the list box by highlighting header, visualizing a check, or whit other solution?

Thank you in advance,
Fabio
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: multiple resource selection
Reply #3 - Sep 27th, 2007 at 9:00am
Print Post  
Here is a small sample application which demonstrates how you can implement the visualization of a selection across multiple resources:

https://mindfusion.org/_samples/_sample_MultipleResourceSelection.zip

Also, when you create an item for a particular resource, it is automatically created for the rest of the selected resources.

Meppy
  
Back to top
 
IP Logged
 
fabiogiustini
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 17
Joined: Sep 26th, 2007
Re: multiple resource selection
Reply #4 - Sep 27th, 2007 at 9:29am
Print Post  
OK, THANS!!! Grin

Another question: is there a vb.net tutorial/guide?
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: multiple resource selection
Reply #5 - Sep 27th, 2007 at 10:54am
Print Post  
Do you mean whether this sample is available in VB? Otherwise, you can find several tutorials in the Planner.NET documentation. Although the sample source code within them is in C#, they can be used by VB.NET programmers as well.

Meppy
  
Back to top
 
IP Logged
 
fabiogiustini
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 17
Joined: Sep 26th, 2007
Re: multiple resource selection
Reply #6 - Sep 27th, 2007 at 11:23am
Print Post  
OK, Meppy thanks for your feedback!!!!
  
Back to top
 
IP Logged
 
fabiogiustini
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 17
Joined: Sep 26th, 2007
Re: multiple resource selection
Reply #7 - Sep 28th, 2007 at 7:29am
Print Post  
Hello Meppy, your is a very good solution!!

Now:

- Is possible to put the resource check inside the calendar control resource column?
-Is possible to view  a data row under the time line so that the user can select the time range from that row and not by selecting the resource row?

Thanks
Fabio
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: multiple resource selection
Reply #8 - Sep 28th, 2007 at 9:14am
Print Post  
Here is an updated sample:

https://mindfusion.org/_samples/_sample_MultipleResourceSelection2.zip

The list view is now gone and the check boxes are embedded in the resource row headers next to the expand/collapse icon. However, it is not possible to add a data row under the time line. You still have to select within any of the resource rows.

Meppy
  
Back to top
 
IP Logged
 
fabiogiustini
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 17
Joined: Sep 26th, 2007
Re: multiple resource selection
Reply #9 - Sep 29th, 2007 at 6:58pm
Print Post  
Ok, Meppy, your solution is compliant with client requirements!
I'm going to plan a demo. A little question: how long is valid a trial version?

Thanks a lot!!!
Fabio
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: multiple resource selection
Reply #10 - Oct 1st, 2007 at 4:48am
Print Post  
The trial version does not expire. The only limitation is that it displays a small label in the lower left corner of the control area.

Meppy
  
Back to top
 
IP Logged
 
fabiogiustini
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 17
Joined: Sep 26th, 2007
Re: multiple resource selection
Reply #11 - Oct 4th, 2007 at 4:12pm
Print Post  
Ok, thank you, you solution is ok.

Now I've just two needs:

1) when i select the cell, i need to draw the bleu rectangle in all cell also if the selection starts inside the cell. In other words i need a cells selection ms excell like: is possible?

2) in resource view of demo application, when i move on the calendar an item associated to many resorces, automaticcaly the items of other resorse moven too. In other word i can move all items group (one item to many resource) just moving one of its. How cai I set this property?

Thank you
Fabio
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: multiple resource selection
Reply #12 - Oct 5th, 2007 at 4:29am
Print Post  
1) You have to use custom drawing to achieve that. Set the Calendar.CustomDraw property to CustomDrawElements.ResourceViewCell and handle the Calendar.Draw event. Then simply paint the entire cell with a particular color if the cell is (partially) within the current selection.

2) You can achieve that by adding more than one resource to the appropriate collection of the Item (thus associating the item with more than one resource at a time). Items that are associated with many resources appear multiple times in the calender - once for each associated resource. Moving one of the item instances automatically updates the other.

For example, to associate an item with more than one contact, use the following code:

Code
Select All
item.Contacts.Add(contact1);
item.Contacts.Add(contact2); 


Meppy
  
Back to top
 
IP Logged
 
fabiogiustini
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 17
Joined: Sep 26th, 2007
Re: multiple resource selection
Reply #13 - Oct 5th, 2007 at 8:26am
Print Post  
OK, for custum drawing.
About point 2, running the sample solution that you sent me (https://mindfusion.org/_samples/_sample_MultipleResourceSelection2.zip ), when Icreate an item for a particular resource, it is automatically created for the rest of the selected resources, but when I move one of them, the others don't move.

can you help me to modify the code?

Thanks
Fabio
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: multiple resource selection
Reply #14 - Oct 5th, 2007 at 11:03am
Print Post  
Sure. Instead of creating many items, each of which associated with an individual resource, simply associate the item already created by the user with all selected resources. Try the following modification:

Code
Select All
e.Item.Resources.Add(r); 


instead of

Code
Select All
Appointment app = e.Item.Clone() as Appointment;
app.Resources.Clear();
app.Resources.Add(r);
calendar.Schedule.Items.Add(app); 


in the ItemCreated event handler.

Meppy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint