Click here to Skip to main content
15,886,609 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
table.DefaultView.RowFilter = "" + comboBox1.Text + " like '" + txtSearch.Text + "%'";

this my code when i five 0 in my search box it shows some error like this Troubleshooting Exceptions: System.Data.EvaluateException i understood there is some problem in the query near **like** now how shud i write my query? to search/filter even zeros?
Posted
Updated 23-May-12 23:26pm
v2
Comments
Oshtri Deka 24-May-12 5:34am    
"when i five 0"
What?
Member 8983639 24-May-12 5:44am    
when i enter 0 into the serachbox der is a problem i mean with decimals its working only for alphabets
Sandeep Mewara 24-May-12 5:55am    
What is the EXACT error. Sharing 'somehting like' does not help.

Further, did you check what you get the rowfilter expression once line is executed?
Member 8983639 24-May-12 6:10am    
here rowfilter is not working when i enter a interger value into textbox to search
Satish32 24-May-12 6:26am    
Would you send the exact RowFilter value for which its breaking.

1 solution

Hi,

Please confirm the table has a column in the value of comboBox1.Text

Your query is correct.

Thanks,
Raja S
 
Share this answer
 
Comments
Member 8983639 24-May-12 7:55am    
yaa got it thanq

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900