EmersonH.Com

Transforming Knowledge into Power

  • Increase font size
  • Default font size
  • Decrease font size

Adding rows

E-mail Print

Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Add row using the Add subroutine.
Dim n As Integer = DataGridView1.Rows.Add()
DataGridView1.Rows.Item(n).Cells(0).Value = "First"
DataGridView1.Rows.Item(n).Cells(1).Value = "Second"
End Sub
End Class

Last Updated on Wednesday, 15 December 2010 15:12