Skip to content

Latest commit

 

History

History
82 lines (58 loc) · 5.14 KB

datagrid-control-windows-forms.md

File metadata and controls

82 lines (58 loc) · 5.14 KB
title description ms.date helpviewer_keywords ms.assetid
DataGrid Control
Learn about the DataGrid control in Windows Forms, which is retained for both backward compatibility and future use.
03/30/2017
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
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.

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
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-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
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

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
Provides links to topics on data binding in Windows Forms.

See also