good day all
can u help me with this:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim dt As New DataTable
dt.Columns.Add("Brand")
dt.Columns.Add("Quantity")
dt.Columns.Add("UnitPrice")
dt.Rows.Add(TextBox1.Text, TextBox2.Text, TextBox3.Text)
DataGridView1.DataSource = dt
End Sub
after adding the datas to the columns, i want to add new data on the next row ..??
can u help me with this:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim dt As New DataTable
dt.Columns.Add("Brand")
dt.Columns.Add("Quantity")
dt.Columns.Add("UnitPrice")
dt.Rows.Add(TextBox1.Text, TextBox2.Text, TextBox3.Text)
DataGridView1.DataSource = dt
End Sub
after adding the datas to the columns, i want to add new data on the next row ..??
Attachments
Last edited by a moderator: