标签:
public void ShowIndex(DataGridView dgv)
{
for (int i = 0; i < dgv.Rows.Count; i++)
{
dgv.Rows[i].HeaderCell.Value = (i+1).ToString(); //HeaderCell获取或设置行的标头单元格
}
}
标签:
原文地址:http://www.cnblogs.com/learningrecord/p/5774385.html