Version

Binding WinCombo to a Data Table

Before You Begin:

The WinCombo™ control is a Windows Forms control, which provides full data binding support using DataSource and DataMember properties.

What You Will Accomplish:

You will learn how to bind WinCombo to the Employees data table of the Northwind database.

Follow These Steps:

  1. Drag and drop an ultraCombo onto your form.

  2. Click the smart tag of the WinCombo control and click the drop down button of the DataSource member.

  3. Select Add Project DataSource from the drop down list, and the Data Source configuration wizard appears.

WinCombo Binding WinCombo to a Data Table 01.png
  1. In the Data Source configuration wizard select Database and click next.

  2. In the Choose your Data Connection dialog, click the New Connection button to configure the connection string. The Add Connection dialog appears.

WinCombo Binding WinCombo to a Data Table 02.png
  1. Set the server name to the server you are using, .\SQLEXPRESS in this case. Set the database to Northwind.

  2. Click Ok. You are returned to the Choose your Data Connection dialog.

  3. Click Next.

  4. Select Tables and do the following:

  1. Choose the Employees table from the drop-down list.

  2. From the Employees drop down list, choose the EmployeeID, LastName, FirstName, and HireDate columns in order to display those columns.

    1. Click the Finish button to close the configuration wizard. The employeesBindingSource object is created and WinCombo is now set up to retrieve Employees data from the Northwind database.

    2. Run the application. WinCombo binds to the Employees table and displays its data.

WinCombo Binding WinCombo to a Data Table 03.png