/ Published in: C#

`w_Dgv` is the name of the DataGridView control.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
private void w_Dgv_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) { // Add row numbers // Taken from "Pro C# 2008 and The .NET 3.5 Platform" pp. 807-808 { e.Graphics.DrawString((e.RowIndex).ToString(), e.InheritedRowStyle.Font, brush, e.RowBounds.Location.X + 15, e.RowBounds.Location.Y + 4 ); } }
Comments
