Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Timetable - programmatically select an appointment (Read 3188 times)
john6630
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 74
Joined: Sep 20th, 2010
Timetable - programmatically select an appointment
Feb 22nd, 2013 at 5:43am
Print Post  
Hi Meppy,
One more question. Is it possible to programatically select a calendar appointment using either the app.ID or app.tag or any other field? I need to repopulate the calendar on-the-fly due to changing data but want to keep the user's current selection highlighted.

Thanks,
John
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Timetable - programmatically select an appointment
Reply #1 - Feb 22nd, 2013 at 7:24am
Print Post  
Hi,

You can select appointments programmatically, by calling the Calendar.ItemSelection.Add method. You only need to identify the appointments to be selected. For example, the following code selects the appointment with Id="selectme":

Code
Select All
foreach (Item item in calendar1.Schedule.Items)
{
	if (item.Id == "selectme")
	{
		calendar1.ItemSelection.Add(item);
		break;
	}
} 


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


I love YaBB 1G - SP1!

Posts: 74
Joined: Sep 20th, 2010
Re: Timetable - programmatically select an appointment
Reply #2 - Feb 25th, 2013 at 3:00pm
Print Post  
Hi Meppy,
That works great. I just did not see the ItemSelection property.

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