STEP 3: Add and DataBind a DataGrid to your DataSource
* Select the tab with WebForm1.aspx (or open it) and drag-and-drop the employee table from the Server Explorer to the design surface. This should create a Connection component and a DataAdapter component on the designer surface.
* Select the DataAdapter1 in the designer tray, then select the Configure Data Adapter . . . link beneath the Properties window. This opens the Data Adapter Configuration Wizard. Configure this DataAdapter using all the default selections (at least, for the purpose of this example. You can modify these as needed for your own applications).
* Drag-and-drop the jobs table from the Server Explorer to the design surface. This should only create a DataAdapter (it should use the Connection from earlier in this step, and not have to create a new one).
* Select the DataAdapter2 in the designer tray, then select the Configure Data Adapter . . . link beneath the Properties window. Again, use all the defaults values in the Wizard.
* Drag-and-drop a DataSet item from the Data tab of the Toolbox, at which point the Add Dataset dialog appears. Make sure that you select Typed Dataset and that the DataGridRelations.Employees DataSet is selected in the drop-down list box.
Partager