For Immediate Onsite or Remote Support Call: (770) 744-4937

How to add new row Datagridview VB.Net

Date: January 10, 2013 Author: Arun Patel Category: VB.NET Visual Basic Comments: 0

Here is an example

'prepare query
Dim sql As String
sql = "SELECT * FROM Items WHERE supplier_id = 1"
Dim ds_Items As New DataSet

ds_Items = Items.objItems.get_itmes(sql)  ' access class to get data

'dgv_Items.DataSource = ds_Items.Tables(0)
For Each row As DataRow In ds_Items.Tables(0).Rows
dgv_Items.Rows.Add(New String() {row("item_no"), row("item_name")})