Help:Radscheduler occurence

3 posts, 1 answers
  1. Mark de Torres
    Mark de Torres avatar
    58 posts
    Member since:
    Jan 2010

    Posted 20 Apr 2011 Link to this post

    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. Answer
    Peter
    Admin
    Peter avatar
    6637 posts

    Posted 22 Apr 2011 Link to this post

    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.

  3. Mark de Torres
    Mark de Torres avatar
    58 posts
    Member since:
    Jan 2010

    Posted 23 May 2011 Link to this post

    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;
                }
            }
Back to Top