Share via


DataGridView

When designing user interfaces you may find it necessary to display tabular data. The DataGridView control provides a powerful and flexible new way for .NET applications to display data in a tabular format. The data store can hold simple, untyped data, such as a one-dimensional array, or it can hold typed data, such as a DataSet. You can use the DataGridView control to show read-only views of a small amount of data, or you can scale it to show editable views of very large sets of data. Many types of data stores can be used as a data source, and binding data to the DataGridView control is straightforward and intuitive, and in many cases as simple as setting the DataSource property. Alternatively, the DataGridView control can operate without a data source bound to it. You can easily customize the appearance of the DataGridView control by choosing among several properties.

The DataGridView control replaces and adds functionality to the DataGrid control in earlier versions, but the DataGrid control is retained for both backward compatibility and future use, if you choose.

Editing the Columns of the DataGridView Control