---
title: "DataGrid Control"
ms.date: "03/30/2017"
helpviewer_keywords: 
  - "datasets [Windows Forms], user interface"
  - "DataGrid control [Windows Forms]"
  - "datasets [Windows Forms], displaying in DataGrid control"
  - "displaying data [Windows Forms], on forms"
  - "data [Windows Forms], displaying on Windows Forms"
ms.assetid: 1d9d5683-43d2-42dd-b6c3-e43f4cf0de99
---
# DataGrid Control (Windows Forms)
> [!NOTE]
> The <xref:System.Windows.Forms.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](differences-between-the-windows-forms-datagridview-and-datagrid-controls.md).  
  
 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](datagrid-control-overview-windows-forms.md)  
 Describes the basic features of the `DataGrid` control.  
  
 [How to: Add Tables and Columns to the Windows Forms DataGrid Control Using the Designer](add-tables-and-columns-to-wf-datagrid-control-using-the-designer.md)  
 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](how-to-add-tables-and-columns-to-the-windows-forms-datagrid-control.md)  
 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](bind-wf-datagrid-control-to-a-data-source-using-the-designer.md)  
 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](how-to-bind-the-windows-forms-datagrid-control-to-a-data-source.md)  
 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](change-displayed-data-at-run-time-wf-datagrid-control.md)  
 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](create-master-details-lists-with-wf-datagrid-control-using-the-designer.md)  
 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-Details 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](how-to-delete-or-hide-columns-in-the-windows-forms-datagrid-control.md)  
 Describes how to remove columns in the `DataGrid` control.  
  
 [How to: Format the Windows Forms DataGrid Control Using the Designer](how-to-format-the-windows-forms-datagrid-control-using-the-designer.md)  
 Describes how to change the appearance-related properties of the `DataGrid` control using the designer.  
  
 [How to: Format the Windows Forms DataGrid Control](how-to-format-the-windows-forms-datagrid-control.md)  
 Describes how to change the appearance-related properties of the `DataGrid` control.  
  
 [Keyboard Shortcuts for the Windows Forms DataGrid Control](keyboard-shortcuts-for-the-windows-forms-datagrid-control.md)  
 Lists shortcuts for navigating through the `DataGrid` control.  
  
 [How to: Respond to Clicks in the Windows Forms DataGrid Control](how-to-respond-to-clicks-in-the-windows-forms-datagrid-control.md)  
 Describes how to determine which cell a user has clicked in the `DataGrid` control.  
  
 [How to: Validate Input with the Windows Forms DataGrid Control](how-to-validate-input-with-the-windows-forms-datagrid-control.md)  
 Describes how to validate input in the dataset bound to the `DataGrid` control.  
  
## Reference  
 <xref:System.Windows.Forms.DataGrid>  
 Provides an overview of the <xref:System.Windows.Forms.DataGrid> class.  
  
 <xref:System.Windows.Forms.DataGrid.DataSource%2A>  
 Provides details about using this property to bind the <xref:System.Windows.Forms.DataGrid> control to data.  
  
## Related Sections  
 [Windows Forms Data Binding](../windows-forms-data-binding.md)  
 Provides links to topics on data binding in Windows Forms.  
  
## See also

- [DataGridView Control](datagridview-control-windows-forms.md)
- [Differences Between the Windows Forms DataGridView and DataGrid Controls](differences-between-the-windows-forms-datagridview-and-datagrid-controls.md)
