Chapter 19 Data Presentation Using the DataGridView Control 471
The Data Sources window displays the objects in Faculty2010DataSet, as shown in the
following screen shot:
In Chapter 18, you dragged individual fields from the Data Sources window to a Windows
form to bind data objects to controls in the user interface. In the next exercise, you’ll follow
a similar procedure, but this time you’ll drag an entire table to the form, and you’ll bind the
table to a DataGridView control so that the fields that you have selected can be displayed
at once.
Create a data grid view object
- Resize the form so that it covers most of the screen.
Before this chapter is complete, you’ll place two data grid view objects side by side
on the form, each with several columns and about 20 rows of data. Remember that
the form can be larger than the room allotted for it within the IDE, and you can close
programming tools or use the scroll bars to see portions of the form that are hidden.
(However, you’ll want to keep the Data Sources window open for the next step .)
- In the Data Sources window, click the Faculty table, and then click the arrow to its right
to display the list of controls that can be bound to the Faculty table on the form.
The Data Sources window looks like this: