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

Reoccurring Appointments Data Sample

6 Answers 40 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Gabriel
Top achievements
Rank 1
Gabriel asked on 05 Jun 2013, 12:58 AM

Hi, is there a sample anywhere that shows how to read from a SQL source reoccurring events?

I set DataRecurrenceField="ReCurrRule" and DataRecurrenceParentKeyField="Id"

and my demo sql query is:

  Select Id, [Subject] Name ,null stdate,  null enddt, 100
  ,'DTSTART:20131218T180000Z DTEND:20131218T190000Z RRULE:FREQ=WEEKLY;COUNT=10;INTERVAL=5;BYDAY=TH  DTSTART:20131224T100000Z DTEND:20131224T110000Z  RRULE:FREQ=WEEKLY;COUNT=20;INTERVAL=1;BYDAY=TU,TH  EXDATE:20131230T100000Z,20090101T100000Z' ReCurrRule
  from dbo.[Event]

But nothing shows up,
Thank you.

Full Control Definition:

            <telerik:RadScheduler ID="RadScheduler1" runat="server" DataDescriptionField="Name" DataEndField="enddt" Height="500"
                DataKeyField="Id" DataSourceID="SqlDataSource1" DataStartField="stdate"
                DataSubjectField="Name" DayEndTime="22:00:00" DayStartTime="06:00:00"
                EnableExactTimeRendering="True" MinutesPerRow="15" Skin="Sunset"
                WorkDayEndTime="22:00:00" WorkDayStartTime="06:00:00" NumberOfHoveredRows="1"
                TimelineView-UserSelectable="false" AllowDelete="False" AllowEdit="False" ShowAllDayRow="false" AdvancedForm-Enabled="False" AllowInsert="False" OnClientTimeSlotClick="TS_Click" MultiDayView-ReadOnly="True" MultiDayView-UserSelectable="True" DataRecurrenceField="ReCurrRule" DataRecurrenceParentKeyField="Id">
                <TimelineView UserSelectable="False" />
                <DayView DayEndTime="22:00:00" DayStartTime="06:00:00" />
                <MultiDayView UserSelectable="true" NumberOfDays="7"/>
            </telerik:RadScheduler>

6 Answers, 1 is accepted

Sort by
0
Gabriel
Top achievements
Rank 1
answered on 06 Jun 2013, 02:08 AM

I have found that between the DTSTART , DTEND and RRULE there MUST be a char 13 and a char 10, basically a CRLF
other wise it doesn't work, the support and documentation on this if horrific, I would expect a better job from you guys.

0
Boyan Dimitrov
Telerik team
answered on 07 Jun 2013, 12:30 PM
Hello,

It seems that the problem is caused by using same column from your data base for the DateKeyField and the DataRecurrenceParentID - the "Id" column. Our recommended approach is to map the DataKeyField and the RecurrenceParentID to different and unique columns ( not already mapped to other data field). 

Please find attached sample project that implements very similar scenario. 

Regards,
Boyan Dimitrov
Telerik
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 the blog feed now.
0
Gabriel
Top achievements
Rank 1
answered on 07 Jun 2013, 03:44 PM
Thank you, I have also tried to bind a unique col to DataRecurrenceParentKeyField and that did not work either, only when I introduced CRLF between the tokens It worked
0
Boyan Dimitrov
Telerik team
answered on 12 Jun 2013, 01:15 PM
Hello,

Could you please clarify whether the sample project form my very last response does work as expected and saves the recurrence parent id value to the database properly? Please explain what exactly is different in your scenario so we can be more helpful.

 

Regards,
Boyan Dimitrov
Telerik
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 the blog feed now.
0
Gabriel
Top achievements
Rank 1
answered on 12 Jun 2013, 04:57 PM

Thank you, but I did not use your sample, my Scheduler is read only, I am populating the reoccurences string on my own in my SQL query

~Gabriel.

0
Boyan Dimitrov
Telerik team
answered on 17 Jun 2013, 04:02 PM
Hello,

Please find here more information about the recurrence pattern in the stored as recurrence rule. 

 

Regards,
Boyan Dimitrov
Telerik
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 the blog feed now.
Tags
Scheduler
Asked by
Gabriel
Top achievements
Rank 1
Answers by
Gabriel
Top achievements
Rank 1
Boyan Dimitrov
Telerik team
Share this question
or