13-06-18, 04:10 PM
كود :
Sub ReNoGridCellsHeader()
Try
For Each R As DataGridViewRow In TtDataGridView.Rows
R.Cells(0).Style.ForeColor = Color.Red
R.Cells(0).Style.BackColor = Color.Goldenrod
R.Cells(0).Value = String.Format((R.Index + 1).ToString("00"))
Next
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub