This is a migrated thread and some comments may be shown as answers.

Programmatically accessing appointments for a specified time period

2 Answers 74 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Jonathan Attree
Top achievements
Rank 1
Jonathan Attree asked on 20 May 2010, 12:44 PM
Hi
I am evaluating the RadScheduler for possible use in a preventative maintenance scheduling application.
What I need to know is whether there is a way to programmatically access a list or collection of appointments for a given time period?
From this I need to then create a maintenance 'job' for each appointment that will be carried out on a handheld device.

Any help much appreciated.

Jonathan Attree

2 Answers, 1 is accepted

Sort by
0
Jonathan Attree
Top achievements
Rank 1
answered on 21 May 2010, 10:26 AM
Anybody there?
Would really appreciate an answer to this.

0
Schlurk
Top achievements
Rank 2
answered on 24 May 2010, 02:55 PM
You can always access the "Appointments" collection of the RadScheduler:

            AppointmentCollection myCollection = RadScheduler1.Appointments; 
            Appointment myAppointment = myCollection[0]; 
            myAppointment.Visible = false

Which just grabs the first appointment and hides it :) If you are looking for grabbing a range within this appointment list you can take use of the GetAppointmentsInRange() function which would look something like this:

AppointmentCollection myCollection = RadScheduler1.Appointments; 
IList<Appointment> myList = myCollection.GetAppointmentsInRange(DateTime.Today, DateTime.Today); 
Appointment myAppointment = myList[0]; 
myAppointment.Visible = false

I was lazy there (with DateTime.Today for both parameters) but basically that function just takes two DateTime objects, the first one is the start-date and the second one is the end-date.


Tags
Scheduler
Asked by
Jonathan Attree
Top achievements
Rank 1
Answers by
Jonathan Attree
Top achievements
Rank 1
Schlurk
Top achievements
Rank 2
Share this question
or