datagridview加入序號

来源:互联网 发布:2016最新人工智能产品 编辑:程序博客网 时间:2024/06/05 11:40
 Dim b As SolidBrush = New SolidBrush(DataGridView1.RowHeadersDefaultCellStyle.ForeColor)
        Dim linen As Integer = 0
        linen = e.RowIndex + 1
        Dim line As String = linen.ToString()
        e.Graphics.DrawString(line, e.InheritedRowStyle.Font, b, e.RowBounds.Location.X, e.RowBounds.Location.Y + 5)
0 0
原创粉丝点击