Chapter 19 Data Presentation Using the DataGridView Control 475
- Click the Preview button.
Visual Studio loads the Faculty table from Faculty2010DataSet, as shown in the
following screen shot:
You should be familiar with some of this data already from Chapter 18, but you now
may be able to see eight columns that you have selected, all in one place. Seeing all the
columns at once is interesting, but it also could amount to information overload—it is
up to you to decide how much database information your users should see, and how it
should be formatted. In fact, you might not even be able to see all eight columns right
now, as is the case in the screen shot. In Visual Studio, it is easy to tailor the data grid
view’s output so that the proper information is visible.
- Click the Close button to close the Preview Data dialog box.
Now you’ll remove the ID and Faculty ID columns from the data grid view to show only the
information that a typical “directory lookup” feature would display on the screen. Recall that
you only included the ID field so that your dataset would have a primary key, which is useful
when data is written back to the original database.