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

How to Find Appointment In radSheduler Using AppointmentID

2 Answers 119 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Radha
Top achievements
Rank 1
Radha asked on 11 Aug 2010, 04:47 AM
ho to find the Appointment in radSheuler Using  Appointment id

am trying following Code but it showing Null

ex : i have 4 appointments ids are{2,4,5,6}. in rad scheduler  Appointments Count showing 4.
 but  RadScheduler1.Appointments.FindByID(2) tin this time Showing null;

am using Following Code
protected void RadToolTipManager1_AjaxUpdate(object sender, ToolTipUpdateEventArgs e)
    {

       // Appointment info = (Appointment)RadScheduler1.Appointments.ToArray()[e.Value;
        int aptId;
        Appointment apt;
        if (!int.TryParse(e.Value, out aptId))//The appoitnment is occurrence and FindByID expects a string
            apt = RadScheduler1.Appointments.FindByID(e.Value);
        else //The appointment is not occurrence and FindByID expects an int
            apt = RadScheduler1.Appointments.FindByID(aptId);
     
       // Session["Apt"] = apt;
   
    }

could u plz help me any susses ion for this problem

2 Answers, 1 is accepted

Sort by
0
Radha
Top achievements
Rank 1
answered on 11 Aug 2010, 10:00 AM
  Appointment apt;
       

 foreach (Appointment apc in RadScheduler1.Appointments)
        {
            if (apc.ID.ToString() == e.Value.ToString())
            {
                apt = apc;
                break;
            }
        }

This is One Way...

its Working Fine
0
Chris
Top achievements
Rank 1
answered on 18 Aug 2010, 05:42 PM
Thank you, Radha!
Tags
Scheduler
Asked by
Radha
Top achievements
Rank 1
Answers by
Radha
Top achievements
Rank 1
Chris
Top achievements
Rank 1
Share this question
or