纳速健身
标题:
c# datagridview 显示左侧列编号
[打印本页]
作者:
yaokai
时间:
2009-7-15 09:23
标题:
c# datagridview 显示左侧列编号
datagridview
private void dgvDataList_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
{
using (SolidBrush b = new SolidBrush(dgvDataList .RowHeadersDefaultCellStyle.ForeColor))
{
int linen = 0;
linen = e.RowIndex + 1;
string line = linen.ToString();
e.Graphics.DrawString(line, e.InheritedRowStyle.Font, b, e.RowBounds.Location.X, e.RowBounds.Location.Y + 5);
SolidBrush B = new SolidBrush(Color.Red);
}
}
欢迎光临 纳速健身 (https://nasue.com/)
Powered by Discuz! X3.4