Binding to a DataGrid Control
To finish off the DataAccess application, you're going to bind a DataSet to a DataGrid control. To set this up, you need to add a DataGrid and ComboBox control to the TabControl1 control.
Follow these steps to set up the rest of the project:
1. | In design mode, click the second tab on the TabControl1 control. |
2. | Drag a ComboBox control from the Toolbox to the TabPage2 control. |
3. | Drag a DataGrid control from the Toolbox to the TabPage2 control. |
Your form should resemble Figure 10.8.
Figure 10.8. Form after adding DataGrid and ComboBox controls to TabPage2.
Next, you must write the code to fill the DataGrid with data ...
Get Sams Teach Yourself Visual Studio® .NET 2003 in 21 Days now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.