Is it possible to add text into ColumnHeader of the RowHeader. I put autoincrement into Rowheaders of my DataGridView and I would like to put "No." above that.
Something like:
//Autoincrement RowHeaders
foreach (DataGridViewRow row in myDGV.Rows)
{
row.HeaderCell.Value = String.Format("{0}", row.Index + 1);
}
No. | myColumn 1 | myColumn 2
1 | myText | myText
2 | myText | myText
//the "No." column are actually RowHeaders
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…