Why, this code create 2 the same columns in grid (Color and Color). How to inputs data color from collection in column which existing before set datasource ??
public Form1()
{
InitializeComponent();
DataGridViewTextBoxColumn ds = new DataGridViewTextBoxColumn();
ds.Name = "Color";
dataGridView1.Columns.Add(ds);
List<Car> cars=new List<Car>();
for (int i = 0; i < 5; i++)
{
Car car=new Car {Type = "type" + i.ToString(),Color=Color.Silver};
cars.Add(car);
}
dataGridView1.DataSource = cars;
}