How to set the work week start day as sunday

2 posts, 0 answers
  1. hema
    hema avatar
    16 posts
    Member since:
    Mar 2011

    Posted 15 Feb 2012 Link to this post

    i want to set work week as sunday. now my application it is displaying as monday. but i want to start work week as sunday-thrusday instead of monday-friday

  2. Ivan Todorov
    Ivan Todorov avatar
    688 posts

    Posted 17 Feb 2012 Link to this post

    Hi Hema,

    Thank you for contacting us.

    Currently, RadScheduler does not support modifying the default work week. However, you can use the CellFormatting event to modify the appearance of the cells so that they are displayed as work time. The following code snippet demonstrates this:
    public partial class Form1 : Form
        public Form1()
            this.radScheduler1.CellFormatting += new EventHandler<Telerik.WinControls.UI.SchedulerCellEventArgs>(radScheduler1_CellFormatting);
            this.radScheduler1.ActiveViewType = Telerik.WinControls.UI.SchedulerViewType.Week;
        void radScheduler1_CellFormatting(object sender, Telerik.WinControls.UI.SchedulerCellEventArgs e)
            e.CellElement.IsWorkTime = (e.CellElement.Date.DayOfWeek != DayOfWeek.Saturday && e.CellElement.Date.DayOfWeek != DayOfWeek.Friday && e.CellElement.Date.Hour > 7 && e.CellElement.Date.Hour < 19);

    Please note that this will only work in DayView and WeekView where ShowWeekend is true.

    I hope you find this useful. Feel free to ask if you have any additional questions.

    Ivan Todorov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top