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

Parse Recurrence Data

5 Answers 89 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
James B.
Top achievements
Rank 1
James B. asked on 19 May 2012, 01:42 AM
I've just begun using the asp.net radscheduler control. I am setting up authorizations that can have several scheduler appointments. We're using the control to add and edit the appointments, but are wanting to create custom grids of the authorizations showing a date's latest appointment time, and to validate if an authorization is valid for a specific day, etc. We will be doing this on asp.net and from a silverlight oob app. The asp.net site will be the only place to add/edit appointments. Are there built in methods to pass in a date and see if there is a valid appointment, and if so, return information about said appointment? Not sure where to begin to parse the recurrence rules to accomplish this. We'll need to parse this data from silverlight as well. Thanks!

5 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 21 May 2012, 11:40 AM
Hello James,

Please, review the Occupied Timeslots demo. There is also a code library entry you can refer to - Occupied time slots and recurring appointments.

As for Silverlight, please send a separate forum post or ticket under the corresponding product type.

Regards,
Peter
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
James B.
Top achievements
Rank 1
answered on 23 May 2012, 10:21 PM
Peter,

Thanks for the samples, but they just seem to call built in methods off of RadScheduler1 events - which I won't have. On a radschedulerLESS page, is it possible to go through the appointments table and show if an appointment happens today, and get some of it's info: subject, startdate, enddate, etc. e.g. just populate a label with this data on a page using datetime.now. The ExceedsLimit method seems to be independent of the scheduler except for passing in an Appointment (which I assume is a RadSchuler1.Appointments object, not just an Appointment record?)

As for silverlight, the app will be using this same Appointments table, thus would need to be able to parse the appointment data as well. I've read about some database inconsistencies between asp.net and silverlight so just want to know if it's possible to parse from silverlight. If not, I'll need to find something else. Does this make sense? Thanks!

0
James B.
Top achievements
Rank 1
answered on 23 May 2012, 10:54 PM
Tinkered with this a bit, so if I cast the records in my appointments table to Telerik.Web.UI.Appointment objects, then I can use the RecurrenceRule methods to see if it falls in a specific date? How does that check against other records in the table (like a parent that recurrs if this is an exception, etc)? I create appointment records based on a parent authorization id, so would need to filter against just those records.

This is the post that discusses the data field differences between silverlight and asp.net:
http://www.telerik.com/community/forums/silverlight/scheduler/radscheduler-for-asp-net-ajax-silverlight-incompatibilities.aspx

So again, would need to do what I'm trying to do with asp.net from silverlight and if not possible due to these incompatibilities then I would have to recreate your recurrence methods or do custom recurrence (which I'd rather not do). Thanks.
0
James B.
Top achievements
Rank 1
answered on 24 May 2012, 04:13 AM
From your sample, finally figured out how to loop thru the appts table, passing in each record, parsing the rules, and showing all appts per for a specific looking forward amt of days. I think in asp.net world I should be able to use that logic to show a "current" appointment in my authorization list page for a specific date. So I guess the only issue I'll need to figure out is what do I need to convert in the recurrencerule value so the silverlight rule parser or rule parser helper? can read it correctly?

e.g.
DTSTART:20120514T080000Z
DTEND:20120514T090000Z
RRULE:FREQ=DAILY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR,SA,SU
EXDATE:20120525T080000Z

needs to be What? for SL parser to work? Guessing that's why you mentioned the SL scheduler forum :)

Thanks,
James

0
Peter
Telerik team
answered on 24 May 2012, 09:29 PM
Hi James,

Here is some more related information which you might find helpful:

You can expand the recurrence rules on the SQL server using UDF as shown in this blog post -
http://blogs.telerik.com/aspnet-ajax/posts/08-08-04/working-with-radscheduler-recurring-appointments-on-sql-server.aspx

Alternatively, you can manually parse the recurrence rule and extract all occurrences or a range of occurrences as shown in this kb article

I assume the Silverlight version of the scheduler control has similar API to allow you to expand the recurring series, but you better contact our Silverlight experts for a code sample.


Greetings, Peter
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Scheduler
Asked by
James B.
Top achievements
Rank 1
Answers by
Peter
Telerik team
James B.
Top achievements
Rank 1
Share this question
or