Recurrences not showing on scheduler

11 posts, 0 answers
  1. Mac
    Mac avatar
    2 posts
    Member since:
    Dec 2007

    Posted 20 May 2008 Link to this post

    I have a list of appointment objects binding to the scheduler, one of which has a recurrence set to weekly, every Wednesday, for the following 10 weeks.

    I can put a break point on my AppointmentDataBound handler and see the appointment come through and look at it's RecurrenceState and see it's set to master.

    The problem is that when the calendar renders I don't see the original date or any of it's occurrences.

    If I remove the following string from my databases table's RecurrenceRule field then it will show correctly on it's original start/end date.

    DTSTART:20080507T100000Z  DTEND:20080507T103000Z  RRULE:FREQ=WEEKLY;COUNT=10;INTERVAL=1;BYDAY=WE

    QuickWatch example can be seen here http://screencast.com/t/BUMerUhOKz

    Version 2008.1.415.35 of Telerik.Web.UI.dll

    Thanks!
  2. Mac
    Mac avatar
    2 posts
    Member since:
    Dec 2007

    Posted 21 May 2008 Link to this post

    So I also tried some demo code to see if it was something with my objects being bound to the Scheduler but I'm seeing a similar issue, so I made an EntityList with a Telerik.Web.UI.Appointment object that has a recurrence rule with a valid range

    Code here http://screencast.com/t/HuMc9c9wBO

    Which then outputted http://screencast.com/t/diswwBhq

    The AppointmentDataBound hits twice, once with an appointment master and one appointment occurrence.
  3. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 26 May 2008 Link to this post


    Hello,

    We have already replied to the support ticket you have opened on this issue. Also, you can consider using the 
    Binding To Generic List example and modify it as follows to achieve the desired outcome:
    private void InitializeAppointments()  
            {  
                DateTime start = DateTime.UtcNow.Date;  
                start = start.AddHours(6);  
                Appointments.Add(new AppointmentInfo("Take the car to the service", start, start.AddHours(1), string.Empty, null, 1));  
                Appointments.Add(new AppointmentInfo("Meeting with Alex", start.AddHours(2), start.AddHours(3), string.Empty, null, 2));  
     
                start = start.AddDays(-1);  
                DateTime dayStart = RadScheduler1.UtcDayStart(start);  
                Appointments.Add(new AppointmentInfo("Bob's Birthday", dayStart, dayStart.AddDays(1), string.Empty, null, 1));  
                Appointments.Add(new AppointmentInfo("Call Charlie about the Project", start.AddHours(2), start.AddHours(3), string.Empty, null, 2));  
     
                start = start.AddDays(2);  
                Appointments.Add(new AppointmentInfo("Get the car from the service", start.AddHours(2), start.AddHours(3), string.Empty, null, 1));  
     
                AppointmentInfo appointment;  
                //List<Appointment> appointments = new List<Appointment>();  
                DateTime start1 = Convert.ToDateTime("5/7/2008 10:00:00 AM").ToUniversalTime();  
                DateTime end1 = Convert.ToDateTime("5/7/2008 10:30:00 AM").ToUniversalTime();  
                           
                RecurrenceRange range = new RecurrenceRange();  
                range.Start = start1;  
                range.EventDuration = end1 - start1;  
                range.MaxOccurrences = 10;  
     
                WeeklyRecurrenceRule rrule = new WeeklyRecurrenceRule(1, RecurrenceDay.Wednesday, range);  
                //appointment.RecurrenceRule = rrule.ToString();  
     
                  
                //appointment = new AppointmentInfo("1", start1, end1, "Test Meeting");  
                appointment = new AppointmentInfo("Test Meeting 1", start1, end1, rrule.ToString(), null, 3);  
                //appointment.RecurrenceState = RecurrenceState.Master;  
     
                //appointments.Add(appointment);  
                Appointments.Add(appointment);  
            } 



    Regards,
    Peter
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  4. iqoaix
    iqoaix avatar
    5 posts
    Member since:
    Oct 2007

    Posted 28 Jun 2008 Link to this post

    Hi,

    I am also having the same problem. I can only see the 1st appointment but the information on the resources and advanced template columns are not showing. Besides binding to the generic list, is there any other ways to resolve the issue?

    Thanks.
  5. T. Tsonev
    Admin
    T. Tsonev avatar
    2817 posts

    Posted 30 Jun 2008 Link to this post

    Hi,

    Can you please paste the relevant parts of the code you are working on, so we can take a look at it?

    Kind regards,
    Tsvetomir Tsonev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Mike
    Mike avatar
    7 posts
    Member since:
    May 2012

    Posted 15 May 2012 Link to this post

    I have a custom object Request which I'm binding the list of request to the calendar which works fine until we try to implement recurrence.  Recurrence is placing appointments on the scheduler but it's a line you can barely see its only happening when recurrencestate is occurence exceptions show up fine.
  7. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 17 May 2012 Link to this post

    Hello Michael,

    Please, review the code of the Binding to Generic List demo and track how recurring appointments are implemented. Are you using similar approach?

    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.
  8. Mike
    Mike avatar
    7 posts
    Member since:
    May 2012

    Posted 17 May 2012 Link to this post

    Yes I'm using a similiar approach. figured out what was happening when setting the startdate and enddate on the recurrencedEditor it was setting for 12:00 am Instead of actual meeting time.  It's setting the proper time now but having a different issue the first occurrence always shows as an exception.

    The other question I have this may or may not be the forum for when editing recurrences I'm using a custom aspx page and it's forward there thre the OnAppointmentClick with recurrence I'm unable to tell if the event is coming from edit series or edit occurence.
  9. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 21 May 2012 Link to this post

    Hello Michael,

    About 'the first occurrence always shows as an exception', pleas make sure you set the - appointment.RecurrenceState = RecurrenceState.Master

    As for the second question, please use - RadScheduler1.EditingRecurringSeries.

    All the best,
    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.
  10. Mike
    Mike avatar
    7 posts
    Member since:
    May 2012

    Posted 21 May 2012 Link to this post

    Still Checking on the RecurrenceState Issue the EditingRecurringSeries works perfectly. 

    I have one more question.  It's necessary for me to make exceptions completely seperate appointments which I don't have an issue doing.  But once I create the other Appointment how can I delete the one from recurrence.  The new Appointment is created serverside on a seperate page from scheduler is there away to trigger a OccurenceDelete within scheduler after I complete my other actions.

    Thanks Mike
  11. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 22 May 2012 Link to this post

    Hello MIchael,

    In most scenarios, RadScheduler will automatically handle creating exceptions. I assume your implementation is somewhat different and you need to manually create the exceptions. Here is an example (attached is also a simple demo)
    protected void Button1_Click(object sender, EventArgs e)
     {
         Appointment masterAppointment = RadScheduler1.Appointments.FindByID(79);
         RecurrenceRule rRule;
         RecurrenceRule.TryParse(masterAppointment.RecurrenceRule, out rRule);
         rRule.Exceptions.Add((new DateTime(2012, 5, 23, 9, 0, 0)).ToLocalTime());
         masterAppointment.RecurrenceRule = rRule.ToString();
         RadScheduler1.UpdateAppointment(masterAppointment);
         RadScheduler1.Rebind();      
     }



    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.
Back to Top