日期:2014-05-18 浏览次数:20960 次
/// <summary>
/// 显示行号
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void DataGridViewEx_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
{
if (showRowHeaderNumbers)
{
string title = (e.RowIndex + 1).ToString();
Brush bru = Brushes.Black;
e.Graphics.DrawString(title, DefaultCellStyle.Font,
bru, e.RowBounds.Location.X + RowHeadersWidth / 2 - 4, e.RowBounds.Location.Y + 4);
}
}