ComponentOne Scheduler for WPF and Silverlight
C1Scheduler Task-Based Help / C1Scheduler Tasks / Setting Mappings and DataSource for the ContactStorage
In This Topic
    Setting Mappings and DataSource for the ContactStorage
    In This Topic

    To set the mappings and datasource for the ContactStorage you can use the following code:

    C#
    Copy Code
    // set mappings and DataSource for the ContactStorage
    ContactStorage cntStorage = Scheduler.DataStorage.ContactStorage;
    ((INotifyCollectionChanged)cntStorage.Contacts).CollectionChanged += new NotifyCollectionChangedEventHandler(Contacts_CollectionChanged);
    cntStorage.Mappings.IdMapping.MappingName = "CustomerId";
    cntStorage.Mappings.TextMapping.MappingName = "CompanyName";
    cntStorage.DataSource = dataSet.Customers;