Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Resource View- View Day, Week, Month (Read 6765 times)
TRB
Junior Member
**
Offline


Meppy knows all!!

Posts: 80
Location: Australia
Joined: Jun 7th, 2013
Resource View- View Day, Week, Month
Oct 12th, 2013 at 9:16am
Print Post  
Hi,
What I am trying to do is, If the user clicks view day, the day's schedule will be displayed and timeline scale will be adjusted to fit the whole day on the screen. if the user clicks view week the whole week will be visible on the screen. I have tried the ensure visible method but this doesn't seem to adjust the timeline scale to fit the week schedule on the screen. This sounds like it should be easy but aparrently not for me. Shocked
  

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


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Resource View- View Day, Week, Month
Reply #1 - Oct 12th, 2013 at 10:09am
Print Post  
The easiest way would be to use the Calendar.SetViewport method. Keep in mind that to work properly, this method requires at least one visible lane in the view. SetViewport can also automatically select an appropriate scale for the timelines based on the specified interval. Here is an example:

Code
Select All
// Select a day
calendar.SetViewport(DateTime.Today, DateTime.Today.AddDays(1), true);

// Select a week, starting from today
calendar.SetViewport(DateTime.Today, DateTime.Today.AddDays(7), true);

// etc; 


I hope this helps.

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


Meppy knows all!!

Posts: 80
Location: Australia
Joined: Jun 7th, 2013
Re: Resource View- View Day, Week, Month
Reply #2 - Oct 13th, 2013 at 4:30am
Print Post  
Thanks so much Meppy!! That is perfect!
  

Regards,
TRB
Back to top
 
IP Logged
 
TRB
Junior Member
**
Offline


Meppy knows all!!

Posts: 80
Location: Australia
Joined: Jun 7th, 2013
Re: Resource View- View Day, Week, Month
Reply #3 - Oct 14th, 2013 at 8:45am
Print Post  
Hi Meppy,
           This is exactly what I wanted except when I set VisibleStartTime and VisibleEndTime it doesn't work? Is that correct or am I doing somthing wrong?
  

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


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Resource View- View Day, Week, Month
Reply #4 - Oct 14th, 2013 at 9:10am
Print Post  
This is correct, the SetViewport method does not currently work when the resource view has hidden days or times, i.e. when VisibleStartTime, VisibleEndTime, or HiddenDays properties are set. Our developers will check if this restriction can be removed at least partially for VisibleStartTime and VisibleEndTime.

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


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Resource View- View Day, Week, Month
Reply #5 - Oct 15th, 2013 at 8:17am
Print Post  
Hi,

The version below should add partial support for SetViewport in resource view with hidden times. There might be some cases where this method will still not work precisely.

https://mindfusion.eu/_temp/MindFusion.Scheduling.trial6.zip

Let me know if there are any problems.

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


Meppy knows all!!

Posts: 80
Location: Australia
Joined: Jun 7th, 2013
Re: Resource View- View Day, Week, Month
Reply #6 - Oct 16th, 2013 at 10:44am
Print Post  
Thanks for the effort you have gone to for me but I am sorry to say I cant get it to work. It seems to work the same as the origenal one. I can get setviewpoint to work without visiblestart/end times set but as soon as i set them it doesn't work.

Is there a way i can do something like, calendar.resourceviewsettings.timelinescale = (calendar.width - row header width) / number of columns???
  

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


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Resource View- View Day, Week, Month
Reply #7 - Oct 16th, 2013 at 11:33am
Print Post  
The previous build appears to be messed up. Check out this one instead:

https://mindfusion.eu/_temp/MindFusion.Scheduling.trial7.zip

Keep in mind that some of the referenced libraries have been changed as well.

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


Meppy knows all!!

Posts: 80
Location: Australia
Joined: Jun 7th, 2013
Re: Resource View- View Day, Week, Month
Reply #8 - Oct 19th, 2013 at 7:32am
Print Post  
Worked exactly as needed Meppy. Thanks once again.  Wink
  

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