Step 2 of 4: Adding a Data Source to the Form
If you already have the item information stored in a database, you can now bind it to the controls on the form. You can use the NorthWind database, located by default in the C:\Program Files\ComponentOne Studio.NET 2.0\Common directory, for the sample.
To add a data source to the page, complete the following steps:
1. Select View | Server Explorer from the Visual Studio menu.
2. In the Server Explorer, expand the tree to locate the data table you want to use, and drag the table to the form. (If you are using the NorthWind database, Nwind.mdb, drag the Products table to the form).
This will add AccessDataSource1 to the form.
3. So that the Products table does not appear on the form, select GridView1 and set its Visible property to False in the Properties window.
4. Now that the data source object is available, right-click the data list and select the End Template Editing menu item.
|