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

Help:Radscheduler occurence

2 Answers 41 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Mark de Torres
Top achievements
Rank 1
Mark de Torres asked on 20 Apr 2011, 08:02 AM
Hi,

I would to display timetable for 10 working days. 
Week 1, the data will be differentiate with for example: Wed 1
Week 2, the data will be differentiate with for example: Wed 2

Then once the week 2 done, the occurrence will start all over again from week 1

Currently, all week 1 and week 2 is displaying in same week (week 1)

2 Answers, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 22 Apr 2011, 09:54 AM
Hello Mark,

I don't quite understand your requirement, but you might need to create two recurring appointments instead of trying to wrap everything into a single recurring appointment.

Greetings,
Peter
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Mark de Torres
Top achievements
Rank 1
answered on 23 May 2011, 07:59 AM
Thanks, its now fixed. Thanks
public string RecurrenceRule
        {
            get
            {
                if (recurrenceRule == null)
                {
                    string temp = weekDay;
                    string output = temp.Substring(temp.Length - 1, 1);
                    if (output == "1")

                    {
                        RecurrenceRange range = new RecurrenceRange();
                        range.Start = this.Start;
                        range.EventDuration = End - Start;
                        range.RecursUntil = GetDate(endDate, endTime);
                        // Create a recurrence rule to repeat the period every week.
                        WeeklyRecurrenceRule rrule = new WeeklyRecurrenceRule(TimetableInterval, GetRecurrenceDay(), range);
                        recurrenceRule = rrule.ToString();
                    }
                    else if (output == "2")
                    {
                        RecurrenceRange range = new RecurrenceRange();
                        range.Start = this.Start + TimeSpan.FromDays(7);
                        range.EventDuration = End - Start;
                        range.RecursUntil = GetDate(endDate, endTime);
                        WeeklyRecurrenceRule rrule = new WeeklyRecurrenceRule(TimetableInterval, GetRecurrenceDay(), range);
                        recurrenceRule = rrule.ToString();
                    }


                    else
                    {
                        RecurrenceRange range5 = new RecurrenceRange();
                        range5.Start = this.Start;
                        range5.EventDuration = End - Start;
                        range5.RecursUntil = GetDate(endDate, endTime);
                        WeeklyRecurrenceRule rrule5 = new WeeklyRecurrenceRule(TimetableInterval, GetRecurrenceDay(), range5);
                        recurrenceRule = rrule5.ToString();
                    }
                }
                return recurrenceRule;
            }




        }


 private RecurrenceDay GetRecurrenceDay()
        {
            switch (this.weekDay)
            {
                case "Mon":
                    return RecurrenceDay.Monday;
                case "Tue":
                    return RecurrenceDay.Tuesday;
                case "Wed":
                    return RecurrenceDay.Wednesday;
                case "Thu":
                    return RecurrenceDay.Thursday;
                case "Fri":
                    return RecurrenceDay.Friday;
                case "Sat":
                    return RecurrenceDay.Saturday;
                case "Sun":
                    return RecurrenceDay.Sunday;
                case "Mon 1":
                    return RecurrenceDay.Monday;
                case "Tues 1":
                    return RecurrenceDay.Tuesday;
                case "Wed 1":
                    return RecurrenceDay.Wednesday;
                case "Thurs 1": 
                    return RecurrenceDay.Thursday;
                case "Fri 1":
                    return RecurrenceDay.Friday;
                case "Mon 2":
                    return RecurrenceDay.Monday;
                case "Tues 2":
                    return RecurrenceDay.Tuesday;
                case "Wed 2":
                    return RecurrenceDay.Wednesday;
                case "Thurs 2":
                    return RecurrenceDay.Thursday;
                case "Fri 2":
                    return RecurrenceDay.Friday;
                default:
                    return RecurrenceDay.Monday;
            }
        }
Tags
Scheduler
Asked by
Mark de Torres
Top achievements
Rank 1
Answers by
Peter
Telerik team
Mark de Torres
Top achievements
Rank 1
Share this question
or