DataGridView绘制序号

1、找到RowPostPaint事件

2、写入事件


/// <summary>
/// 绘制序号
/// </summary>
private void dgvStatementLog_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
{
  WinBasicLayout wbl = new WinBasicLayout();
wbl.SetDataGridViewNum(sender, e);
}

你可能感兴趣的:(datagridview)