Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic EnsureVisible in TimeTable view (Read 3602 times)
cds_ks
YaBB Newbies
*
Offline



Posts: 3
Joined: Sep 21st, 2006
EnsureVisible in TimeTable view
Sep 21st, 2006 at 7:03pm
Print Post  
I'm evaluating Planner.NET, and so far I'm excited about the possibilities. In particular, the ability to extend the control with custom editors and inherited Item types is going to be useful for us.

One thing I can't figure out: EnsureVisible sometimes does nothing at all. Example:

calendar1.Date=DateTime.Today;
calendar1.EnsureVisible(DateTime.Now);

In this case, the calendar doesn't scroll at all. However, if I drag the mouse to make a selection, click an appointment, etc., suddenly EnsureVisible works fine.

Is this a known bug, or something I'm doing wrong?
Thanks.
  
Back to top
WWW  
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: EnsureVisible in TimeTable view
Reply #1 - Sep 22nd, 2006 at 5:04am
Print Post  
This actually happens when you are in a groupped view (i.e. Calendar.GroupType is set to one of the group constants). When the view is groupped you have to also specify the resource whose date you want visible to avoid ambiguity. To specify a resource, use the EnsureVisible overloaded method that accepts a resource as a second parameter. Similar to the following:

Code
Select All
calendar.EnsureVisible(date, someResource); 



EnsureVisible(DateTime) works correctly when something is selected because it invokes EnsureVisible(DateTime, Resource) with a reference to the resource whose cells / items are selected.

Meppy
  
Back to top
 
IP Logged
 
cds_ks
YaBB Newbies
*
Offline



Posts: 3
Joined: Sep 21st, 2006
Re: EnsureVisible in TimeTable view
Reply #2 - Sep 28th, 2006 at 1:35pm
Print Post  
That fixed it.

Even now that I know that, the documentation isn't clear to me. I would have expected the calendar to scroll to the specified time in the currently displayed resource. Even showing a randomly chosen resource would be better than doing nothing.

If you plan on keeping that behavior, I'd suggest you revise the documentation on EnsureVisible.

Thanks!
  
Back to top
WWW  
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: EnsureVisible in TimeTable view
Reply #3 - Sep 29th, 2006 at 4:41am
Print Post  
The behavior of EnsureVisible(DateTime) has been fixed. It should now scroll to the specified date of the first available resource when nothing is selected. This change will be available in the next official release.

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