Hi guys,
I have a gridview and textbox. I can filter the grid just fine with the textbox, but I would like to allow the user to type in part of a name.
I thought something like this would work but it doesn't:
Emp_Name LIKE'%'+@.Emp_Name+'%'
Thank you.
That should work|||That's what I thought too, but it doesn't. I guess I should give more info.
I am using an objectdatasource to populate the gridview. The object is a table adapter. It seems like the wildcards are completely ignored. If I am looking for smith, I can type smith and get the correct results. But if I type smit, nothing gets returned, though I want Smith to be returned. If I actually literally type the wildcard characters into the textbox the results are very unpredictable. Typing %smit% will return the correct result, as will %smi% But if I type %sm% then nothing gets returned. It seems as though the number of characters matter when doing this. And like I said, if I have'%'+@.Emp_Name+'%' in the actual query within the table adapter, the wildcards are ignored. Hopefully there is some kind of solution to this.
Thank you very much.
|||Anyone? Let me know if you need more information.
No comments:
Post a Comment