private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
{
e.Graphics.DrawString(
Convert.ToString(e.RowIndex + 1),
e.InheritedRowStyle.Font,
new SolidBrush(e.InheritedRowStyle.ForeColor),
e.RowBounds.X +15,
e.RowBounds.Y +5);
{
e.Graphics.DrawString(
Convert.ToString(e.RowIndex + 1),
e.InheritedRowStyle.Font,
new SolidBrush(e.InheritedRowStyle.ForeColor),
e.RowBounds.X +15,
e.RowBounds.Y +5);
}