ComponentOne EventsCalendar for ASP.NET Web Forms
Working with EventsCalendar for ASP.NET Web Forms / Data and DataBinding / Binding Data to a C1EventsCalendar Control Tutorial / Mapping to the Data Storage
In This Topic
    Mapping to the Data Storage
    In This Topic

    Once the AccessDataSource controls are mapped to the database, you can begin mapping to the C1EventsCalendar data storage. This must be done in order for the events and calendars in the data source to appear in the events calendar in your application. Since there are both events and calendars stored in the EventsCalendarNwind.mdb and you configured the AccessDataSource controls to access these tables of the database, you can map to the C1EventsCalendar C1EventStorage and C1CalendarStorage.

    To map to the C1EventStorage, follow these steps:

    1. Select the C1EventsCalendar control and click View | Properties Window.
    2. Expand the DataStorage node and then expand the EventStorage node.
    3. Enter AcccessDataSource_Events next to the DataSource property.
    4. Expand the Mappings node and then expand each node under this node. Enter the mapping properties as defined in the following table:

      Mapping Node MappingName Property
      CalendarMapping Calendar
      ColorMapping Color
      DescriptionMapping Description
      EndMapping End
      IdMapping AppointmentId
      LocationMapping Location
      PropertiesMapping N/A
      StartMapping Start
      SubjectMapping Subject
      TagMapping Tag

      To map to the C1CalendarStorage, follow these steps:

      1. Select the C1EventsCalendar control and click View | Properties Window.
      2. Expand the DataStorage node and then expand the CalendarStorage node.
      3. Enter AcccessDataSource_Calendars next to the DataSource property.
      4. Expand the Mappings node and then expand each node under this node. Enter the mapping propertiess as defined in the following table:

        Mapping Node MappingName Property
        ColorMapping Color
        DescriptionMapping Description
        IdMapping CalendarId
        LocationMapping Location
        NameMapping Name
        PropertiesMapping Properties
        TagMapping Tag

    Run the Project

    Press F5 to run the application.

    Find December 16, 2011 using the date bar at the bottom of the C1EventsCalendar in Day view.

    C1EventsCalender

    Click the yellow event. Notice that the calendar property in the Events dialog box is mapped to adeline's calendar. The red event is mapped to john's calendar.

    See Also