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
35
how to hide days in UltraMonthViewSingle
posted

Hi,

I'm using an ultramonthviewsingle ( wich show only one week ) to show the user's appointments and I would like to add a button wich show/hide saturday and sunday in this view.

I know I can use an ultraDayView but I prefer the presentation of ultramonthviewsingle, and I don't want to set the dayOfWeek visible attribute to false in my calendarInfo because I use an ultraMonthViewMulti too ( I don't want to hide week end in this view ).

Thanks

  • 2094
    Suggested Answer
    Offline posted

    Straight from the Help:

     

    How to Hide a Day of the Week

     

    WinCalendarInfo™ can be used to hide a day of the week across multiple WinSchedule™ views. The procedure to do this doesn't matter which view you are using, as the change is made to the WinCalendarInfo not the individual view.

    The example code below assumes you have a WinCalendarInfo on your form called UltraCalendarInfo1, and at least one of the WinSchedule views as well. The WinSchedule view has its CalendarInfo property set to the UltraCalendarInfo1 that is on your form.

    In Visual Basic:

    Imports Infragistics.Win.UltraWinSchedule
    ...
    Private Sub Hide_a_Day_of_the_Week_Load( _
    ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Me.UltraCalendarInfo1.DaysOfWeek(DayOfWeekEnum.Sunday).Visible = False
    End Sub




    Cheers
    Aaron
  • 69832
    Verified Answer
    Offline posted

    sylvaneau said:
    I don't want to set the dayOfWeek visible attribute to false

    That is the only way to do it.