Help!!!!!!
CodePudding user response:
How to row number, do you add or data itself, someCodePudding user response:
Own addPrivate void GV_RowPostPaint (object sender, DataGridViewRowPostPaintEventArgs e)
{
A Rectangle Rectangle=new Rectangle (" e.R owBounds. Location. X,
"E.R owBounds. Location. Y,
GV. RowHeadersWidth - 4,
"E.R owBounds. Height);
TextRenderer. DrawText (um participant raphics, (" e.R owIndex + 1). The ToString (),
GV. RowHeadersDefaultCellStyle. The Font,
A rectangle,
GV. RowHeadersDefaultCellStyle. ForeColor,
TextFormatFlags. VerticalCenter | TextFormatFlags. Right);
}
CodePudding user response:
void refresh ()
{
Int count=1;
Foreach (DataGridViewRow row in this. DataGridView1. Rows)
{
If (row. Visible)
{
Row. HeaderCell. Value=(https://bbs.csdn.net/topics/count++.ToString);
}
}
}