---
title: Displaying Data in DataGridView Control
description: Learn how to use the Windows Forms DataGridView control to display data from a variety of external data sources.
ms.date: "03/30/2017"
helpviewer_keywords: 
  - "data [Windows Forms], displaying in tabular format"
  - "data grids [Windows Forms], displaying data"
  - "displaying data [Windows Forms], data grids"
  - "DataGridView control [Windows Forms], displaying data"
ms.assetid: b170b52a-2ebd-4948-ac2f-e52d494cebb2
---
# Displaying Data in the Windows Forms DataGridView Control
The `DataGridView` control is used to display data from a variety of external data sources. Alternatively, you can add rows and columns to the control and manually populate it with data.  
  
 When you bind the control to a data source, you can generate columns automatically based on the schema of the data source. If these columns do not appear just as you want them to, you can hide, remove, or rearrange them. You can also add unbound columns to display supplemental data that does not come from the data source.  
  
 Additionally, you can display your data using standard formats (such as currency format), or you can customize the display formatting to present your data however you need to (such as changing the background color for negative numbers, or replacing string values with corresponding images).  
  
## In This Section  
 [Data Display Modes in the Windows Forms DataGridView Control](data-display-modes-in-the-windows-forms-datagridview-control.md)  
 Describes the options for populating the control with data.  
  
 [Data Formatting in the Windows Forms DataGridView Control](data-formatting-in-the-windows-forms-datagridview-control.md)  
 Describes the options for formatting cell display values.  
  
 [Walkthrough: Creating an Unbound Windows Forms DataGridView Control](walkthrough-creating-an-unbound-windows-forms-datagridview-control.md)  
 Describes how to manually populate the control with data.  
  
 [How to: Bind Data to the Windows Forms DataGridView Control](how-to-bind-data-to-the-windows-forms-datagridview-control.md)  
 Describes how to populate the control with data by binding it to a `BindingSource` that contains information pulled from a database.  
  
 [How to: Autogenerate Columns in a Data-Bound Windows Forms DataGridView Control](autogenerate-columns-in-a-data-bound-wf-datagridview-control.md)  
 Describes how to automatically generate columns based on a bound data source.  
  
 [How to: Remove Autogenerated Columns from a Windows Forms DataGridView Control](remove-autogenerated-columns-from-a-wf-datagridview-control.md)  
 Describes how to hide or delete columns generated automatically from a bound data source.  
  
 [How to: Change the Order of Columns in the Windows Forms DataGridView Control](how-to-change-the-order-of-columns-in-the-windows-forms-datagridview-control.md)  
 Describes how to rearrange columns generated automatically from a bound data source.  
  
 [How to: Add an Unbound Column to a Data-Bound Windows Forms DataGridView Control](unbound-column-to-a-data-bound-datagridview.md)  
 Describes how to supplement data from a bound data source by displaying additional, unbound columns.  
  
 [How to: Bind Objects to Windows Forms DataGridView Controls](how-to-bind-objects-to-windows-forms-datagridview-controls.md)  
 Describes how to bind the control to a collection of arbitrary objects so that each object is displayed in its own row.  
  
 [How to: Access Objects Bound to Windows Forms DataGridView Rows](how-to-access-objects-bound-to-windows-forms-datagridview-rows.md)  
 Describes how to retrieve an object bound to a particular row of the control.  
  
 [Walkthrough: Creating a Master/Detail Form Using Two Windows Forms DataGridView Controls](creating-a-master-detail-form-using-two-datagridviews.md)  
 Describes how to display data from two related database tables so that the values shown in one `DataGridView` control depend on the currently selected row in another control.  
  
 [How to: Customize Data Formatting in the Windows Forms DataGridView Control](how-to-customize-data-formatting-in-the-windows-forms-datagridview-control.md)  
 Describes how to handle the <xref:System.Windows.Forms.DataGridView.CellFormatting?displayProperty=nameWithType> event to change the appearance of cells depending on their values.  
  
## Reference  
 <xref:System.Windows.Forms.DataGridView>  
 Provides reference documentation for the <xref:System.Windows.Forms.DataGridView> control.  
  
 <xref:System.Windows.Forms.DataGridView.DataSource%2A?displayProperty=nameWithType>  
 Provides reference documentation for the <xref:System.Windows.Forms.DataGridView.DataSource%2A> property.  
  
 <xref:System.Windows.Forms.BindingSource>  
 Provides reference documentation for the <xref:System.Windows.Forms.BindingSource> component.  
  
## Related Sections  
 [Data Entry in the Windows Forms DataGridView Control](data-entry-in-the-windows-forms-datagridview-control.md)  
 Provides topics that describe how to change the way users add and modify data in the control.  
  
## See also

- [DataGridView Control](datagridview-control-windows-forms.md)
- [Column Types in the Windows Forms DataGridView Control](column-types-in-the-windows-forms-datagridview-control.md)
