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

[Solved] binding RecurrenceRule list

4 Answers 198 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
nagi
Top achievements
Rank 1
nagi asked on 31 Dec 2007, 07:35 AM

I have created a scheduler which binds to list , it works fine. when I created recurrence event, its not working (I did not find a RecurrenceRule sample Example ) .I create a sample example and binding the data but its not working .......can u please provida a sample to bind a recurrence Rule with list ( with scheduler )

Thanks and regards
Nagireddy T

 

4 Answers, 1 is accepted

Sort by
0
nagi
Top achievements
Rank 1
answered on 02 Jan 2008, 05:40 AM

I am binding the data as shown in the below example :

DateTime

start = Convert.ToDateTime("7/30/2007 10:30:00 AM"); //DateTime.UtcNow.Date;

 

DateTime start1 = Convert.ToDateTime("7/30/2007 11:30:00 AM"); //DateTime.UtcNow.Date;

 

string strRecurrence = "DTSTART:20070730T103000Z" +

"DTEND:20070730T113000Z" +

"RRULE:FREQ=DAILY;COUNT=2;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR,SA,SU;";

Appointments.Add(new AppointmentInfo("Take the car to the service", start, start1, strRecurrence, null));



I am using 'AppointmentInfo' Class in the sample example,does  this make sense or I should follow any other process .

Waiting for your Reply .
Thanks and regards ,
Nagireddy

0
nagi
Top achievements
Rank 1
answered on 03 Jan 2008, 05:49 AM
recurrence rule is not able to work  properly when I bind the data initially . If  I create a recurrence while its running it working fine ,If  I stop and rebuild the application, created recurrence rule again its not working properly . I hope there must be a problem with the scheduler.
0
Peter
Telerik team
answered on 04 Jan 2008, 12:43 PM
Hello Nagi,

I think the problem is with the recurrence string. Please, use "\r\n" to represent a new line. Here is an example:

private void InitializeAppointments()  
        {  
            string strRecurrence = "DTSTART:20070330T063000Z\r\nDTEND:20070330T073000Z\r\nRRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20070406T073000Z;BYDAY=MO,TU,WE,TH,FR;\r\n";  
 
              
            DateTime recStart = Convert.ToDateTime("3/30/2007 6:30:00 AM");  
            DateTime recEnd = Convert.ToDateTime("3/30/2007 7:30:00 AM");  
 
            Appointments.Add(new AppointmentInfo("test", recStart, recEnd, strRecurrence, null, 1));  
 

Does this help?

Best wishes,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
nagi
Top achievements
Rank 1
answered on 07 Jan 2008, 05:29 AM
Thanks for the reply and this is working fine Peter,it will be better if you add the recurrene event in smaple examples

Regards,
Nagireddy T
Tags
Scheduler
Asked by
nagi
Top achievements
Rank 1
Answers by
nagi
Top achievements
Rank 1
Peter
Telerik team
Share this question
or