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

Recurrence Rule

15 Answers 326 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
chinnu
Top achievements
Rank 1
chinnu asked on 01 Feb 2012, 10:19 AM
Hi

I am getting the recurrence rule as a string .So only one row is inserted in the database table for recurring appointments also.
My requirement is quite different.
I need to insert each row for each appointment.For eg : An appointment saved with 10 recurring appointments, results in one row insertion in usual case.For me i need to insert 10 rows to the database table for the 10 appointments.I mean I have to treat it as individual appointments.So how can I acheive that.

And one more thing,the recurrence rule is like a string given below.

"

 

DTSTART:20120201T090000Z DTEND:20120201T092000Z RRULE:FREQ=WEEKLY;UNTIL=20120301T000000Z;INTERVAL=1;BYDAY=MO,TU,WE,TH,SA,SU

 

"

I need to get it as an array or a collection.Is there any built in funtion in rad scheduler for that?..Please help...

15 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 01 Feb 2012, 01:16 PM
Hi Chinnu,

You can handle AppointmentInsert to parse the recurrence rule and manually update the data source. Then cancel the event (e.Cancel = true) to prevent the default logic for inserting the appointment.


Kind 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
chinnu
Top achievements
Rank 1
answered on 02 Feb 2012, 10:50 AM
HI

Thank for the quick response.
Yeah the link u provided is helpful for me.
But again the problem is I couldnt get the interval or end date that i provided in the advanced insert item template.
Max occurences can be given via code.Actually we are mentioning it in the insert template.Why I am not getting the value i provided?
Another issue is ,for hourly recurrence,I put the interval as 5.But it is taking 2 hours by default.Please help me to solve the issue.

How can I retrieve the interval for hourly recurrence,weekdays for weekly recurrence etc from the advanced template,instead of hard coding it in the code behind.?
And one more thing..How can I identify selected type recurrence..whether  a hourly or daily or weekly or any other type of recurrence?
I am not able to figure it out in my main page from the advanced insert template where radscheduler is placed.Please help...

Thanks and Regds
Chinnu

0
chinnu
Top achievements
Rank 1
answered on 04 Feb 2012, 10:21 AM
Hi

I got the solution...Below is the link for what I was searching for...

http://www.telerik.com/support/kb/aspnet-ajax/scheduler/how-to-display-all-radscheduler-appointments-in-gridview.aspx

Regards
Chinnu :)
0
Kamlesh
Top achievements
Rank 1
answered on 23 Mar 2012, 11:35 AM
We want to manage the recurrence appointment from the Recurrence Rule, we have to add status in Recurrence Rule for each Occurrence date of appointment.
We have one row in database and a status filed, when we are using that field to show status, it is showing on all the occurrence.

Can it possible, to manage different status.

Thanks
Kamlesh


0
Plamen
Telerik team
answered on 26 Mar 2012, 08:40 AM
Hello Kamlesh,

 
You can refer to the Working with Recurring Appointments help topic where is shown how to get the occurrences start times. 

As for the status field, please have in mind that normally in the data source only the parent appointment and the exceptions are kept so if you want to assign a different status you will have to save them separately as it is explained in this blog post.

Hope this will be helpful.

Regards,
Plamen Zdravkov
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
Joyce
Top achievements
Rank 1
answered on 06 Apr 2012, 12:44 PM

 
Thanks Chinnu for put this link http://www.telerik.com/support/kb/aspnet-ajax/scheduler/how-to-display-all-radscheduler-appointments-in-gridview.aspx here. When use this solution insert each recurrence appointments each row, there are many many repeat appointments display. how do you solve this problem?

Thanks,

Joyce
0
Plamen
Telerik team
answered on 09 Apr 2012, 03:05 PM
Hi Joyce,

 
Would you please elaborate a little bit because it is not very clear what is the exact issue you are facing regarding the linked KB?

Regards,
Plamen Zdravkov
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
Joyce
Top achievements
Rank 1
answered on 13 Apr 2012, 11:58 AM

Thanks Plamen,
For example: If I make a recurrence appointments everyday from 4/16/12 to 4/18/12. It will insert to table like below. When display, it will repeat 3 times for each day in page. If I make a 20 days recurrence appointments, it will repeat 20 times on each day in page.
 

StartDatatime           EndDatatime            RecurrenceRule
4/16/2012 10:00:00  4/16/2012 11:00:00  DTSTART:20120416T100000Z DTEND:20120418T110000Z RULE:FREQ=DAILY;UNTIL=20120418T000000Z;...

StartDatatime            EndDatatime           RecurrenceRule
4/17/2012 10:00:00  4/17/2012 11:00:00  DTSTART:20120416T100000Z DTEND:20120418T110000Z RULE:FREQ=DAILY;UNTIL=20120418T000000Z;...

StartDatatime           EndDatatime            RecurrenceRule
4/18/2012 10:00:00  4/18/2012 11:00:00  DTSTART:20120416T100000Z DTEND:20120418T110000Z RULE:FREQ=DAILY;UNTIL=20120418T000000Z;...


Thanks and regards,

Joyce

0
Plamen
Telerik team
answered on 18 Apr 2012, 08:45 AM
Hello Joyce,

 
I have inspected the issue once again but could not notice any unusual behavior. The KB article that you pointed is supposed to show all the recurrences in a grid and since your appointments are repeating every day the expected result is exactly the same as what you have printed. I could not see where seems to be the odd result.

The fastest way to deal with such issues it is to tell us exactly what is the result you expect and what is the result that is coming out so we can inspect them both.
 

Regards,
Plamen Zdravkov
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
Joyce
Top achievements
Rank 1
answered on 18 Apr 2012, 11:30 AM

Thanks Plamen,

I have solved above repeat problem by insert recurrenceRule and recurrenceAppointmentID in a seperate table. It displays fine. When edit appointments, to get the recurrenrule to compare it's single appointment or recurrence. Edit  recurrence works fine. But when edit a single appointment, I want to detect that recurrence checkbox( the ID is recurrentAppointment) checked or not, if checked, I will edit it as recurrence appointments. but it always has error when reach the below line nubmer 1:

1  CheckBox RecurrentAppointment = (CheckBox)RecurrenceEditor1.FindControl("RecurrentAppointment");
2   if (RecurrentAppointment.Checked)
3  {
4   Recurrenceflag= true;
5   } 

Do you have any idear?

Best regards,

Joyce

0
Plamen
Telerik team
answered on 20 Apr 2012, 12:39 PM
Hi Joyce,

 
If you want to check the appointment's is Recurrence state in the FormCreated event I will recommend you to use the following code:

protected void RadScheduler1_FormCreated(object sender, SchedulerFormCreatedEventArgs e)
    {
        if (e.Appointment.RecurrenceState == RecurrenceState.NotRecurring)
        {
             
        }

Hope this will be helpful.

Kind regards,
Plamen Zdravkov
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
Soft4Care
Top achievements
Rank 2
answered on 27 Nov 2012, 08:28 PM
How can I check "RecurrentAppointment" checkbox, if I can't  do it in RadScheduler_FormCreated because I'm only using RecurrenceEditor control?
0
Plamen
Telerik team
answered on 29 Nov 2012, 08:18 AM
Hello Julio,

 If you are using only RecurrenceEditor on the page you can check it's "RecurrentAppointment" CheckBox programmatically as in the code below:

<telerik:RadSchedulerRecurrenceEditor runat="server" ID="RecurrenceEditor1">
      </telerik:RadSchedulerRecurrenceEditor>
      <telerik:RadButton runat="server" ID="RadButton2"OnClick="RadButton1_Click" Text="Server"></telerik:RadButton>
protected void RadButton1_Click(object sender, EventArgs e)
   {
       RecurrenceEditor recurrenceEditor = Page.FindControl("RecurrenceEditor1"as RecurrenceEditor;
       CheckBox recurreceCheckbox = (CheckBox)recurrenceEditor.FindControl("RecurrentAppointment");
       recurreceCheckbox.Checked = true;
   }

Hope this will be helpful.

Greetings,
Plamen
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
Pankaj
Top achievements
Rank 1
answered on 25 Sep 2013, 10:35 AM
At your live URL http://demos.telerik.com/aspnet-ajax/scheduler/examples/timelineview/defaultcs.aspx

I Created a new recurring appointment daily type with specify endDate(09/01/2038)

But when i check appointment for dated (01/01/2022) then recurring appointment not display.
I attached screen-shot of live demo.

Please check.
0
Plamen
Telerik team
answered on 25 Sep 2013, 12:40 PM
Hello,

 
You can set the MaximumRecurrenceCandidates property to the desired number of occurrences.

Regards,
Plamen
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
chinnu
Top achievements
Rank 1
Answers by
Peter
Telerik team
chinnu
Top achievements
Rank 1
Kamlesh
Top achievements
Rank 1
Plamen
Telerik team
Joyce
Top achievements
Rank 1
Soft4Care
Top achievements
Rank 2
Pankaj
Top achievements
Rank 1
Share this question
or