When you bind a
DataGridView control and set the
AutoGenerateColumns property to
true, columns are automatically generated using default column types appropriate for the data types contained in the bound data source.
Columnswhich are automatically generated are
DatagridViewTextBoxColumn ------Generated automatically when binding to numbers and strings
DataGridCheckBoxColumn --------Used with
Boolean and
CheckState values. Generated automatically when binding to values of these types
DataGridViewImageColumn -----Generated automatically when binding to byte arrays,
Image objects, or
Icon objects
if you want other columnsyou want to write your own code.
refer following link,
http://msdn.microsoft.com/en-us/library/bxt3k60s.aspx