Do as below
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
ResetDataGridView()
Dim con as New SqlConnection(conString)
Dim cmd As New SqlCommand("select srno as Id , name as 'Full Name' from table1", con)
Dim dt As New DataSet()
Dim sda As New SqlDataAdapter(cmd)
sda.Fill(dt)
datagridview1.DataSource = dt.Tables(0)
con.Close()
End sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
ResetDataGridView()
Dim con as New SqlConnection(conString)
Dim cmd As New SqlCommand("select serial as Id, Items as Name from table2", con)
Dim dt As New DataSet()
Dim sda As New SqlDataAdapter(cmd)
sda.Fill(dt)
datagridview1.DataSource = dt.Tables(0)
con.Close()
End sub
Private Sub ResetDataGridView()
dataGridView1.CancelEdit()
dataGridView1.Columns.Clear()
dataGridView1.DataSource = Nothing
End Sub