ComponentOne Extender Controls for ASP.NET Web Forms
Wijmo Control Toolkit Extender Controls / C1EventsCalendarExtender / Changing Data View of the Events Calendar
In This Topic
    Changing Data View of the Events Calendar
    In This Topic

    You can change the data view of an events calendar at design time using the Properties window, in Source view, and in Code.  You can change the view using the C1EventsCalendarExtender.ViewType property.

    Changing the Calendar View in Design View

    To change the calendar view in Design view, complete the following steps:

    1. Select View | Properties Window in the Visual Studio menu.
    2. Click the drop-down list at the top of the Properties window and select Panel1_C1EventsCalendarExtender.
    3. Click the drop-down arrow next to the C1EventsCalendarExtender.ViewType property.
    4. Select Day, Week, Month, or List, depending on the view you want for the calendar.

    Changing the Calendar View in Source View

    To change the calendar view to Month, for example, in Source view, add ViewType="Month" to the <cc1:C1EventsCalendarExtender> tag. Once you've set this property, your markup will resemble the following::

    <cc1:C1EventsCalendarExtender ID="Panel1_C1EventsCalendarExtender"

            runat="server" Colors="red,darkorchid,green,blue,cornflowerblue,yellow,bronze"

            SelectedDate="2012-02-09" TargetControlID="Panel1"

            VisibleCalendars="Default,Home,Work" ViewType="Month">

        </cc1:C1EventsCalendarExtender>

    Changing the Calendar View in Code

    Add the following code to the Page_Load event to set the calendar's C1EventsCalendarExtender.ViewType to Month:

     

    Visual Basic
    Copy Code

    Panel1_C1EventsCalendar1.ViewType = C1.Web.Wijmo.Extenders.C1EventsCalendar.C1EventsCalendarViewType.Month

     

    C#
    Copy Code
    Panel1_C1EventsCalendar1.ViewType =  C1.Web.Wijmo.Extenders.C1EventsCalendar.C1EventsCalendarViewType.Month;