Scheduler for WinForms | ComponentOne
Scheduler Control / Appointments / Contacts / Adding Contacts to the Master Contact List
In This Topic
    Adding Contacts to the Master Contact List
    In This Topic

    C1Schedule supports contacts created in code or at run time through the Master Contact List dialog box. The following code, added to the Form_Load event, creates a contact for John Smith:

    C#
    Copy Code
    // Create the contact.        
    C1.C1Schedule.ContactCollection contcol;
    contcol = this.c1Schedule1.DataStorage.ContactStorage.Contacts;
    C1.C1Schedule.Contact contact = new C1.C1Schedule.Contact();
    contact.Text = "John Smith";
    // Insert the contact into the Master Contact List.        
    contcol.Insert(0, contact);
    

    At run time, creating a contact can be added through the Master Contact List dialog box. Clicking the Master Contact List button in the Contacts dialog box opens the Master Contact List dialog box where you add or delete contacts.

    After you create a contact or contacts, add the contact to the appointment in the Contacts dialog box. For more details on how to add a contact to an appointment, see Assigning Contacts to an Appointment.