Schedule week view

Posted by: fsegui on 11 May 2021, 4:25 pm EST

    • Post Options:
    • Link

    Posted 11 May 2021, 4:25 pm EST

    Hi,

    Is it possible in C1Schedule to only display some days in the week view/workweek view?

    For example, to show only Monday, Tuesday, Thursday and Friday in the weekview.

    Thanks,

    BR

  • Posted 12 May 2021, 5:09 am EST

    Hello BR,

    You can use the below-given code to show only Monday, Tuesday, Thursday, and Friday in the workweek view by adding the desired days in WorkDays collection:

    
      private void Form1_Load(object sender, EventArgs e)
            {
                this.c1Schedule1.CalendarInfo.WorkDays.AddRange(new System.DayOfWeek[] {
                System.DayOfWeek.Monday,
                System.DayOfWeek.Tuesday,
                System.DayOfWeek.Thursday,
                System.DayOfWeek.Friday});
            }
    

    Regards,

    Prabhat Sharma.

  • Posted 12 May 2021, 7:57 am EST

    Hi Prabhat Sharma,

    Thanks, works fine. A detail for those interested:

    Workdays.AddRange method needs an array and not a list to refresh Schedule directly.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels