ComponentOne EventsCalendar for ASP.NET Web Forms
Working with EventsCalendar for ASP.NET Web Forms / Data and DataBinding
In This Topic
    Data and DataBinding
    In This Topic

    EventsCalendar for ASP.NET Web Forms  allows you to use standard ADO.NET databinding to bind the C1EventsCalendar control to a datasource.

    Binding data to the C1EventsCalendar control involves two simple steps:

    1. Configure an AccessDataSource: Choose the database to bind to and then specify the parameters that are mapped to the fields in the database table.
    2. Map to the Data Storage: Map to the C1EventsCalendar data storage (C1EventStorage or C1CalendarStorage) by specifying the data source in the C1EventStorage.DataSourceID/C1CalendarStorage.DataSourceID property and then entering the names of the data fields using the Mappings properties. Each database table and its columns can be mapped to separate areas in the storage, and then calendars, subjects, colors, descriptions, start and end times, locations and more can be loaded from the database.

    C1EventStorage

    The C1EventStorage class allows you to begin binding to a data source by specifying the data source in the DataSourceID property. You can then map the fields from the data source to the EventStorage using the C1EventStorageMappings properties.

    C1EventStorageMappings Properties Description
    CalendarMapping Allows the calendar property to be bound to the appropriate field in the data source.
    ColorMapping Allows the color property to be bound to the appropriate field in the data source.
    DescriptionMapping Allows the description property to be bound to the appropriate field in the data source.
    EndMapping Allows the end property to be bound to the appropriate field in the data source.
    IdMapping Gets the Id property to be bound to the appropriate field in the data source.
    LocationMapping Allows the location property to be bound to the appropriate field in the data source.
    PropertiesMapping Allows other event properties to be bound to the appropriate field in the data source.
    StartMapping Allows the start property to be bound to the appropriate field in the data source.
    SubjectMapping Allows the subject property to be bound to the appropriate field in the data source.
    TagMapping Allows the tag property to be bound to the appropriate field in the data source (the tag property can be used to store any user-defined information).

    C1EventsCalender

    C1CalendarStorage

    The C1CalendarStorage class allows you to begin binding to a data source simply by specifying the data source in the DataSourceID property. You can then map the fields from the data source to the CalendarStorage using the C1EventStorageMappings properties.

    C1CalendarStorageMappings Properties Description
    ColorMapping Allows the color property to be bound to the appropriate field in the data source.
    DescriptionMapping Allows the description property to be bound to the appropriate field in the data source.
    LocationMapping Allows the location property to be bound to the appropriate field in the data source.
    NameMapping Allows the name property to be bound to the appropriate field in the data source.
    PropertiesMapping Allows other calendar properties to be bound to the appropriate field in the data source.
    TagMapping Allows the tag property to be bound to the appropriate field in the data source (the tag property can be used to store any user-defined information).

    C1EventsCalender

    The Binding Data to a C1EventsCalendar Control Tutorial provides step-by-step instructions on configuring two AccessDataSource controls and mapping to the C1EventStorage and C1CalendarStorage.

    See Also