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

[Solved] How do I get the End After value?

3 Answers 71 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
vincent
Top achievements
Rank 1
vincent asked on 16 Mar 2009, 04:00 PM
I am get the value for End After.  For example, UNTIL=20090330T000000Z and COUNT=22 and NO END Date.

Is there an object that contains this?

Thanks

Vincent

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 18 Mar 2009, 02:18 PM
Hi vincent,

You can parse the appointment's recurrence and get the last element of the Occurrences collection:

 protected void RadScheduler1_AppointmentDataBound(object sender, Telerik.Web.UI.SchedulerEventArgs e)  
    {  
        if (e.Appointment.RecurrenceRule != String.Empty)  
        {  
            RecurrenceRule rrule;  
            RecurrenceRule.TryParse(e.Appointment.RecurrenceRule, out rrule);  
                          
            Response.Write("Last occurrence starts at: " + rrule.Occurrences.Last().ToString()+"<br/>");  
            Response.Write("Last occurrence ends at: " + rrule.Occurrences.Last().Add(e.Appointment.Duration).ToString() + "<br/>");  
 
        }  
    } 




Peter
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
SKS
Top achievements
Rank 1
answered on 23 Oct 2009, 08:06 PM
Can anyone from Telerik Team tell me if there is a nice and neat way of displaying the duratiion of appointments at the botom for each day and also for the selected week

thanks

SKS
0
Peter
Telerik team
answered on 28 Oct 2009, 11:06 AM
Hello SKS,

You can handle AppointmentCreated which will occur for all appointments in the visible range of RadScheduler. For example:

protected void RadScheduler1_AppointmentCreated(object sender, AppointmentCreatedEventArgs e)
   {
       Response.Write(e.Appointment.Duration.TotalHours.ToString());
   }


Best wishes,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Scheduler
Asked by
vincent
Top achievements
Rank 1
Answers by
Peter
Telerik team
SKS
Top achievements
Rank 1
Share this question
or