Skip to main content


The PhoneFormObj_Load is the event-handler for the PhoneFormObj Load event. The method does the following:

  1. Invokes InitConnection. This method, which you have already coded, creates and opens the connection to Caché.

  2. Invokes InitContactList. This method, which was explained on an earlier page, creates a list, named ContactList, containing the object IDs of all the Contact instances in the database.

  3. Initializes the comboboxes for the Edit Phone Information and Edit Contact Information sections of the form.

  4. Invokes DisplayTreeView. This method, which will be explained on a later page, creates the tree displayed on the left hand side of the form.

Here is the method. Add the body of the method to the PhoneFormObj_Load stub in PhoneFormObj.cs.

private void PhoneFormObj_Load(object sender, EventArgs e)
  comboBox1.Items.AddRange(new Object[] { "Business", "Personal" });
  comboBox2.Items.AddRange(new Object[] 
                                   { "Business", "Home", "Mobile", "Fax" });
FeedbackOpens in a new tab