No subject

I have a combobox name cboSearchBy and a textbox named txtSearchString. The user has to first select the field name they want to search by by choosing from the combobox then they can type the string in the textbox. I want to filter it but can't get it!! HELP! Dim dvView As New DataView() Dim SearchBy As String SearchBy = cboSearchBy.Text With dvView .Table = dsProfile.Tables("Profile") .RowFilter = "'SearchBy' = '" & txtSearchString.text & "'" End With dtgProfile.DataSource = dvView If I did .RowFilter = "Username = 'quilla'" then it filters it.. there's something wrong!

1 Reply

CB Clay Burch Syncfusion Team June 7, 2002 08:56 AM UTC

Instead of .RowFilter = "'SearchBy' = '" & txtSearchString.text & "'" try something like .RowFilter = SearchBy & " = '" & txtSearchString.text & "'"

Loader.
Up arrow icon