Hello all,
I'm working with a set of UltraWinSchedule appointments and an UltraDayView control that displays the appointments. I'd like to be able to click a "Week View" button that makes the UltraDayView display the current week, with each day having the appointments in their associated timeslots displayed side by side vertically, much like how Microsoft Outlook shows the work week calendar.
I've read other forum posts on this, telling how to clear the SelectedDateRanges property of the CalendarInfo object and then adding a new SelectedDateRange from the week start to the week end, or from the week start for 5 days, using the following code:
uciMain.SelectedDateRanges.Clear()uciMain.SelectedDateRanges.Add(weekStart, 5)
When I do this, I get a warning for "Too many days have been selected.". The MaxSelectedDays property on the CalendarInfo object is set well above 5 days. What could be causing this error?
Thanks!
Melissa
Hello,
No worries. Thank you for your feedback. I am glad to hear that you found the source of this issue.
Please feel free to let me know if a question about our toolset comes up on your mind.
It was a layout issue I wasn't aware of until I started making a sample solution for you. I have it resolved now. Thanks so much for your continued help.
I tried this scenario and it works fine for me. After using the code above I am still getting the day headers.
Could you please try the following code:
ultraDayView1.DayTextFormat = "ddd dd";
If possible please attach a small sample project of your own, reproducing the mentioned issue, I will be happy to investigate it for you.
That hides the week end days like I want, but it also gets rid of the day labels at the top of the column in the UltraDayView.
If I'm individually specifying the DayOfWeek objects for Saturday and Sunday, is there something else I have to do to keep the day headers visible for the other days that are shown?
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.