dataGridView1.Columns[0].HeaderCell.Value = "编号";
dataGridView1.Columns [1] .HeaderCell.Value = "name";
the Columns array starts from 0, 0 represents the first row
the Columns array starts from 0, 0 represents the first row
Reproduced in: https: //www.cnblogs.com/baishiying/archive/2012/08/17/2643776.html