DataGrid Control (Windows Forms)
Note
The DataGridView control replaces and adds functionality to the DataGrid control; however, the DataGrid control is retained for both backward compatibility and future use, if you choose. For more information, see Differences Between the Windows Forms DataGridView and DataGrid Controls.
The Windows Forms DataGrid control provides a user interface to ADO.NET datasets, displaying tabular data and enabling updates to the data source.
When the DataGrid control is set to a valid data source, the control is automatically populated, creating columns and rows based on the shape of the data. The DataGrid control can be used to display either a single table or the hierarchical relationships between a set of tables.
In This Section
DataGrid Control Overview (Windows Forms)
Describes the basic features of the DataGrid control.How to: Add Tables and Columns to the Windows Forms DataGrid Control Using the Designer
Describes how to add tables and columns to the DataGrid control using the designer.How to: Add Tables and Columns to the Windows Forms DataGrid Control
Describes how to add tables and columns to the DataGrid control programmatically.How to: Bind the Windows Forms DataGrid Control to a Data Source Using the Designer
Describes how to bind an ADO.NET dataset to the DataGrid control using the designer.How to: Bind the Windows Forms DataGrid Control to a Data Source
Describes how to bind an ADO.NET dataset to the DataGrid control.How to: Change Displayed Data at Run Time in the Windows Forms DataGrid Control
Describes how to change data programmatically in the DataGrid control.How to: Create Master-Details Lists with the Windows Forms DataGrid Control Using the Designer
Describes how to display two tables, tied together with a parent/child relationship, in two separate DataGrid controls using the designer.How to: Create Master/Detail Lists with the Windows Forms DataGrid Control
Describes how to display two tables, tied together with a parent/child relationship, in two separate DataGrid controls.How to: Delete or Hide Columns in the Windows Forms DataGrid Control
Describes how to remove columns in the DataGrid control.How to: Format the Windows Forms DataGrid Control Using the Designer
Describes how to change the appearance-related properties of the DataGrid control using the designer.How to: Format the Windows Forms DataGrid Control
Describes how to change the appearance-related properties of the DataGrid control.Keyboard Shortcuts for the Windows Forms DataGrid Control
Lists shortcuts for navigating through the DataGrid control.How to: Respond to Clicks in the Windows Forms DataGrid Control
Describes how to determine which cell a user has clicked in the DataGrid control.How to: Validate Input with the Windows Forms DataGrid Control
Describes how to validate input in the dataset bound to the DataGrid control.
Reference
DataSource
Provides details about using this property to bind the DataGrid control to data.
Related Sections
- Windows Forms Data Binding
Provides links to topics on data binding in Windows Forms.
See Also
Concepts
Differences Between the Windows Forms DataGridView and DataGrid Controls