hello i was wonder if i could get some ideal of how to turn this function off
what i have is this
this is some code that i picked up on you-tube how ever in the video it does not tell you how to shut it off so that your datagridview will return to normal once you have done the search this is what i have tried.
i have also tried
last but not least
all 3 will reset the datagridview but none of them shut the search off so that you can add another entry without having to close the program
any help i would appreciate.
what i have is this
VB.NET:
Public Sub FilterData(valueToSearch As String)
Dim Connection As New SqlConnection("server=someip;user=someuser;password=somepassword;database=Report")
Dim searchQuery As String = "SELECT * From Table1 WHERE CONCAT ([ID], Julian_Date, Serial_Number, [User]) like '%" & valueToSearch & "%'"
Dim command As New SqlCommand(searchQuery, Connection)
Dim adapter As New SqlDataAdapter(command)
Dim Table As New DataTable
Connection.Open()
adapter.Fill(Table)
Table1DataGridView.DataSource = Table
Connection.Close()
End Sub
VB.NET:
Private Sub refreshdgv()
Me.Update()
TextBox3.Text = ""
TextBox2.Text = ""
TextBox4.Text = ""
ComboBox1.Text = ""
ComboBox2.Text = ""
ComboBox3.Text = ""
End Sub
VB.NET:
Private Sub refreshdgv()
Table1DataGridView = Table1DatagridView
TextBox3.Text = ""
TextBox2.Text = ""
TextBox4.Text = ""
ComboBox1.Text = ""
ComboBox2.Text = ""
ComboBox3.Text = ""
End Sub
VB.NET:
Private Sub refreshdgv()
Table1DataGridView.Update
TextBox3.Text = ""
TextBox2.Text = ""
TextBox4.Text = ""
ComboBox1.Text = ""
ComboBox2.Text = ""
ComboBox3.Text = ""
End Sub
any help i would appreciate.
Last edited by a moderator: