Reputation: 233
I am wondering in row in the datagridview, How can i show the row index in the row header ? Or you, guy, could guide me to the trick like i describe below.
thanks in advance
Upvotes: 2
Views: 7496
Reputation: 4348
Each row header is HeaderCell after all so you can deal with it as DataGridViewCell
:
For i = 0 To grd.RowCount - 1
grd.Rows(i).HeaderCell.Value = CStr(i + 1)
Next
Upvotes: 3