Microsoft Visual Basic 2010 Step by Step eBook

(Tina Meador) #1

472 Part IV Database and Web Programming


Because you have selected an entire table, you do not see individual bound controls in
this list box. Instead you see the following options:
o DataGridView, the default selection, which displays a grid of columns and rows
representing the fields and records in the Faculty table.
o Details, which configures Visual Basic to create individual controls (with associated
labels) automatically for each field in a table that you drag to the form. Although
I won’t demonstrate Details now, it is a useful option if you want to present
tabular data in a slightly more approachable format.
o None, which removes any association between the table and a user interface
element or control. (If you select None for a table, you will not be able to drag
the table from the Data Sources window to the form, and a Null icon will appear
next to the table name .)
o Customize, which lets you select a different control that might be suitable for
displaying multiple database fields (such as the ListBox control).


  1. Click the DataGridView option, and then drag the Faculty table to the left side of
    your form.
    Visual Studio creates a navigation bar at the top of the form, adds dataset, binding
    source, table adapter, table adapter manager, and binding navigator components to
    the component tray, and creates a data grid view object named FacultyDataGridView
    on the form. Your screen looks similar to the following screen shot:

Free download pdf