Data-binding


Description

This sample shows how to bind data to the C1EventsCalendar control.

In order to bind the C1EventsCalendar to a data source, you need to follow these steps:

Configure EventStorage.

  • Add data source control to your page.
  • Setup the event storage's DataSourceID property. If needed, fill the DataMember property.
  • Generate Insert/Update/Delete commands if you wish to allow end-user to edit events. e.g.:
  • Configure event storage data mappings. e.g.:
    <EventStorage DataSourceID="AccessDataSource_Events">
    	<Mappings>	
    		<IdMapping MappingName="AppointmentId" />			
    		<StartMapping MappingName="Start" />
    		<EndMapping MappingName="End" />
    		<SubjectMapping MappingName="Subject" />
    		<LocationMapping MappingName="Location" />
    		<DescriptionMapping MappingName="Description" />
    		<ColorMapping MappingName="Color" />
    	</Mappings>
    </EventStorage>
    

Configure CalendarStorage.

  • Add data source control to your page.
  • Setup the calendar storage's DataSourceID property. If needed, fill the DataMember property.
  • Generate Insert/Update/Delete commands if you wish to allow end-user to edit calendars.
  • Configure calendar storage data mappings. e.g:
    <CalendarStorage DataSourceID="AccessDataSource_Calendars">
    	<Mappings>
    		<IdMapping MappingName="CalendarId" />
    		<LocationMapping MappingName="Location" />
    		<ColorMapping MappingName="Color" />
    		<DescriptionMapping MappingName="Description" />
    		<NameMapping MappingName="Name" />
    		<PropertiesMapping MappingName="Properties" />
    		<TagMapping MappingName="Tag" />
    	</Mappings>
    </CalendarStorage>
    
Documentation