Test Filter for results and handle error is 0 records
Ryan Lashway
61
Reputation points
I am running a filter on a binding source with the following code. I am getting an error is the search value has no record and can not resolve it:
CustomerBindingSource.Filter = String.Format("Firstname Like '{0}%' or lastname like '{0}%' or CustCode Like'{0}%'", searchValue)
The filter works, but as soon as you type "oienceoicvnwevoiwn" it errors due to no record being found and the bindingsource = 0