title: Data not showing up in DataGridView after a search query
body: <p>Hello i am trying to search for data from a table using a funcion, however when i Input the number of the customerID it doesnt show up in the data gridview but the data is still passed to my textboxes. Could anyone help me in explaining what I did wrong?</p>
  <pre><code> Private Function SearchData(Fname As String, ID As Int32) As DataTable
      Dim dt As New DataTable
      Dim newds As New DataSet
      Dim ssql As String = &quot;SELECT * FROM customers WHERE fname LIKE @Fname OR CustomerID =@ID&quot;
      Using con As New SQLiteConnection(ConStr),
               cmd As New SQLiteCommand(ssql, con)
          con.Open()
          cmd.Parameters.Add(&quot;@Fname&quot;, DbType.String).Value = Fname
          cmd.Parameters.Add(&quot;@ID&quot;, DbType.Int32).Value = ID
          dt.Load(cmd.ExecuteReader)
          Dim da As New SQLiteDataAdapter(cmd)
          da.Fill(newds, &quot;customers&quot;)
          dt = newds.Tables(0)
          If dt.Rows.Count &gt; 0 Then
              ToTextbox(dt)
          End If
          dgvCustomerInfo.DataSource = dt
          con.Close()
      End Using
      Return dt
  End Function
    Private Sub IbtnSearch_Click(sender As Object, e As EventArgs) Handles ibtnSearch.Click
  
      If txtSearchName.Text &lt;&gt; &quot;&quot; Then
          SearchData(txtSearchName.Text, &quot;0&quot;)
          Dim dt = GetSearchResults(txtSearchName.Text)
          dgvCustomerInfo.DataSource = dt
  
      ElseIf txtSearchID.Text &lt;&gt; &quot;&quot; Then
          SearchData(&quot;0&quot;, txtSearchID.Text)
          Dim dt = GetSearchResults(txtSearchID.Text)
          dgvCustomerInfo.DataSource = dt
      End If
  
  End Sub
  </code></pre>