Unplanned
Last Updated: 11 Aug 2022 10:13 by ADMIN
Anu
Created on: 11 Aug 2022 04:45
Category: UI for WinForms
Type: Bug Report
0
RadScheduler: MinutelyRecurrenceRule is not parsed correctly

Hi,

I am using CalHelper to convert recurrence rule to and from string.

It looks like when I convert rule to string and then parse it back to recurrence, some of the properties get dropped.

Please see below from my VS editor highlighting this:

 

Am I doing something wrong, or is this a bug?

 

Thanks

Anu

1 comment
ADMIN
Dess | Tech Support Engineer, Principal
Posted on: 11 Aug 2022 10:13

Hi, Anu,

The CalHelper.RecurrenceRuleToString method returns an incomplete string representation of the recurrence rule which can't be completely parsed by the CalHelper.TryParseRecurrenceRule method later. If you want to extract the recurrence rule to text and then parsed the rule back, the appropriate method is CalHelper.RecurrenceRuleToStringEx.

            MinutelyRecurrenceRule rule1 = new MinutelyRecurrenceRule();
            rule1.Interval = 15;
            rule1.Start = DateTime.Today.AddDays(1);
            rule1.End = DateTime.Today.AddDays(2);  
            string rule1String = CalHelper.RecurrenceRuleToStringEx(rule1);

            RecurrenceRule rule2;
            CalHelper.TryParseRecurrenceRule(rule1String, out rule2);  

            Appointment a = new Appointment(DateTime.Now, TimeSpan.FromMinutes(10),"A1");
            a.RecurrenceRule = rule1;
            this.radScheduler1.Appointments.Add(a);

            Appointment a2 = new Appointment(DateTime.Now, TimeSpan.FromMinutes(10), "A2");
            a2.RecurrenceRule = rule2;
            this.radScheduler1.Appointments.Add(a2);

I have approved this item in order to avoid any further confusion which method to be used.

I have also updated your Telerik points.

If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.