c # winform change the name of DataGridView column header in code, set the column name, column name modification

dataGridView1.Columns[0].HeaderCell.Value = "编号";

dataGridView1.Columns [1] .HeaderCell.Value = "name";
the Columns array starts from 0, 0 represents the first row

Reproduced in: https: //www.cnblogs.com/baishiying/archive/2012/08/17/2643776.html

Guess you like

Origin blog.csdn.net/weixin_33895016/article/details/93440073