Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Multipe Item Selection (Read 2670 times)
Aliza
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 13
Joined: Jul 4th, 2007
Multipe Item Selection
Aug 26th, 2007 at 5:38am
Print Post  
Hi,
I'm using the calendar with resource view. I would like to disable multiple item selection (i.e. allow only one appointment to be selected at a given time).
I tried Calendar.Selection.AllowMultiple = Disabled but I can still select multiple items (by holding down the ctrl button and clicking on the items).

Any suggestions?
Thanks,
Aliza
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Multipe Item Selection
Reply #1 - Aug 27th, 2007 at 4:50am
Print Post  
There is no currently a property which can be used for this purpose, but you can achieve it easily by handling the Calendar.ItemSelectionChanged event. The following code gives an idea on how to do it:

Code
Select All
private void calendar_ItemSelectionChanged(object sender, ItemSelectionEventArgs e)
{
	if (e.IsSelected)
	{
		calendar.ItemSelection.Clear();
		calendar.ItemSelection.Add(e.Item);
	}
} 


Meppy
  
Back to top
 
IP Logged
 
Aliza
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 13
Joined: Jul 4th, 2007
Re: Multipe Item Selection
Reply #2 - Aug 27th, 2007 at 10:45am
Print Post  
Thanks!

Just for curiosity, what is the meaning of the MultipleSelection property?
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Multipe Item Selection
Reply #3 - Aug 27th, 2007 at 11:38am
Print Post  
Setting Selection.AllowMultiple to State.Disabled prevents users from selecting range of dates, i.e. they can only select a single date. Clicking and dragging with the mouse will not select several dates, but rather only the last pointed date before the mouse is released. For example, when this property is disabled, in a SingleMonth view the users would be able to select only a single day cell, while in Resource view, they would be able to select only a single moment in time (which usually results in the selection not being visible).

In general, Calendar.Selection corresponds to the date/time selection within the control, while Calendar.ItemSelection corresponds to the appointment selection.

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