RowPostPaint event and manually draw the numbers. If you want to do something more custom, you could handle the Private Sub SetRowHeaderNumber(ByRef row As DataGridViewRow) Private Sub DataGridView1_RowsRemoved(sender As Object, e As DataGridViewRowsRemovedEventArgs) Handles DataGridView1.RowsRemovedįor Each row As DataGridViewRow In Me.DataGridView1.Rows Me.SetRowHeaderNumber(Me.DataGridView1.Rows(e.RowIndex)) Private Sub DataGridView1_RowsAdded(sender As Object, e As DataGridViewRowsAddedEventArgs) Handles DataGridView1.RowsAdded You can do this when a new row is added and when a row is removed, iterate over all rows and update their header values. A quick and simple solution is to set the row's HeaderCell value.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |