Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1015
Hiding Saturday & Sunday for an UltraDayView
posted

Hello all,

I'm working with an UltraDayView control in which I'm displaying Friday through Thursday (based on our work weeks). I'd like to give the user the ability to hide the weekend days (Saturday & Sunday) through a user setting, but I'm not sure how to actually hide these columns/days on the UltraDayView.

Can anyone give an example of how to do this?

Thanks!

Parents
No Data
Reply
  • 71886
    Verified Answer
    Offline posted

    Hello,

    Could you please try the following code and see if it meets your requirements:


                Infragistics.Win.UltraWinSchedule.DayOfWeek dayOfWeek1 = new Infragistics.Win.UltraWinSchedule.DayOfWeek(System.DayOfWeek.Sunday);
                Infragistics.Win.UltraWinSchedule.DayOfWeek dayOfWeek2 = new Infragistics.Win.UltraWinSchedule.DayOfWeek(System.DayOfWeek.Saturday);
                dayOfWeek1.Enabled = false;
                dayOfWeek2.Enabled = false;
                this.ultraCalendarInfo1.DaysOfWeek.Add(dayOfWeek1);
                this.ultraCalendarInfo1.DaysOfWeek.Add(dayOfWeek2);
    

     Please feel free to let me know if I misunderstood you or if you have any other questions.

Children