15-11-18, 11:54 AM
(15-11-18, 11:21 AM)rmnr كتب :مشكور اخى فين اضع Private Sub DataGridView1_RowPostPaint ويوجد حظا عندى فى كلمة Windows.Formsكود :
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
DataGridView1.RowHeadersWidth = 50
End Sub
Private Sub DataGridView1_RowPostPaint(sender As Object, e As DataGridViewRowPostPaintEventArgs) Handles DataGridView1.RowPostPaint
Dim x = 14
If sender.RightToLeft = Windows.Forms.RightToLeft.Yes Then x = e.RowBounds.Width - x
e.Graphics.DrawString(e.RowIndex + 1, sender.Font, Brushes.Black, New Point(x, e.RowBounds.Top + 2))
End Sub

