|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
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).