Friends I m working with RowFilter, its working good with String Data, and like statements, specially its Autometed functuallity with string data is good, just like in follwing code (it is written in Textbox "txtSearch"s TextChanged Event)
Private Sub txtSearch_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSearch.TextChanged PurchaseDt.DefaultView.RowFilter = "salePerson like '" & txtSearch.Text & "%'" End Sub
this is working good, it search saleperson field in datatable (purchaseDt in my case) as we type text, if we remove text from textbox (txtSearch) then it shows all Rows data from database, same is not with Integer, i tried following code in textChange event of textbox
PurchaseDt.DefaultView.RowFilter = "PUrchaseID=" & txtSearch.Text & ""
it returns data if there is some number or integer in txtsearch, as soon as we remove/clear text from txtSearch textbox it return error,
"Syntax error: Missing operand after '=' operator."
Dear why it is not working just like string data where if there is not any text in text box it return all records, or plz provide any solution so that if there is no number in textbox (RowFilter) then it should be cleared or return all records again or some thing like that