Hello,
I'm using the code below to search in XML files depending on the values entered in the text boxes, problem is I don't know how to combine the search statement with an "AND" when the users enter data in both textboxes. Can you please help me solve this problem? I am using VB.NET (VS 2008)
Thanks,
Victor
Dim bs As New BindingSource() bs.DataSource = dt C1TrueDBGrid1.DataSource = bs Dim FilteredDT As DataTable
If Not (TextBox1.Text = String.Empty) Then Dim DV As New DataView(dt, "Receiver like " & "'" & TextBox1.Text & "'" & "", Nothing, DataViewRowState.CurrentRows)
FilteredDT = DV.ToTable
C1TrueDBGrid1.DataSource = FilteredDT End If
If Not (TextBox2.Text = String.Empty) Then
Dim DV As New DataView(dt, "Donor like " & "'" & TextBox2.Text & "'" & "", Nothing, DataViewRowState.CurrentRows)
FilteredDT = DV.ToTable
C1TrueDBGrid1.DataSource = FilteredDT
End If
I'm using the code below to search in XML files depending on the values entered in the text boxes, problem is I don't know how to combine the search statement with an "AND" when the users enter data in both textboxes. Can you please help me solve this problem? I am using VB.NET (VS 2008)
Thanks,
Victor
Dim bs As New BindingSource() bs.DataSource = dt C1TrueDBGrid1.DataSource = bs Dim FilteredDT As DataTable
If Not (TextBox1.Text = String.Empty) Then Dim DV As New DataView(dt, "Receiver like " & "'" & TextBox1.Text & "'" & "", Nothing, DataViewRowState.CurrentRows)
FilteredDT = DV.ToTable
C1TrueDBGrid1.DataSource = FilteredDT End If
If Not (TextBox2.Text = String.Empty) Then
Dim DV As New DataView(dt, "Donor like " & "'" & TextBox2.Text & "'" & "", Nothing, DataViewRowState.CurrentRows)
FilteredDT = DV.ToTable
C1TrueDBGrid1.DataSource = FilteredDT
End If