Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Delete selection dynamicly (Read 3191 times)
elwin
Ex Member


Delete selection dynamicly
Feb 23rd, 2010 at 8:29am
Print Post  
It's me again  Cheesy

In the SingleMonth view I doubleclick on a date. In the Calendar1_DateClick event I switch automatically to the TimeTable view with the selected date. So far so good.

In the timeTable view the date is selected because of the selection. The selection property is readonly. Is it possible to deselect it through code?
I want to keep the property Selection enabled.

Another unforseen circumstance is:
1. Doubleclick on a date. The TimeTable view is
    shown with the selected date
2. Now I switch to the WeekRange view and 2
   dates are selected.
When it is possible to deselect this problem is solved too.

Thanks in advance.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Delete selection dynamicly
Reply #1 - Feb 23rd, 2010 at 8:38am
Print Post  
Use the Calendar.Selection.Reset method to clear the current selection.

Regards,
Meppy
  
Back to top
 
IP Logged
 
elwin
Ex Member


Re: Delete selection dynamicly
Reply #2 - Feb 23rd, 2010 at 8:47am
Print Post  
I have done that but it is only working when selecting a date in the WeekRange view and switch to the TimeTable View.

When doubleclick in the MonthRange or Singlemonth view the selection is still there in the WeekRange and TimeTable view.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Delete selection dynamicly
Reply #3 - Feb 23rd, 2010 at 9:47am
Print Post  
Try calling Calendar.ResetDrag before switching to the new view.

Code
Select All
calendar.Selection.Reset();
calendar.ResetDrag();
calendar.CurrentView = CalendarView.Timetable; // for example 


Regards,
Meppy
  
Back to top
 
IP Logged
 
elwin
Ex Member


Re: Delete selection dynamicly
Reply #4 - Feb 23rd, 2010 at 11:50am
Print Post  
That did the trick.

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