Displaying Data in a DataGridView Control
To display data in a new Windows Forms DataGridView control
To display data in an existing Windows Forms DataGridView control
Open the Data Sources window. For more information, see How to: Open the Data Sources Window.
Note: |
|---|
If the
Data Sources window is empty, then add a data source to it. For more information, see Data Sources Overview.
|
Open your form in the Windows Forms Designer.
Select a table in the Data Sources window, click the drop-down arrow, and then select DataGridView.
Drag the table from the Data Sources window onto a DataGridView on the form.
The DataGridView control is now bound to the table that you have dragged onto it. A DataSet, TableAdapter, and BindingSource appear in the component tray.
Tasks
Concepts
Reference
Other Resources