I am using a SearchBox with datasource set by a method using fulltext search, case insensitive and accent insensitive. Everything works fine, except the case of accent insensitive, because of Filter.
For example, when users type "to", my fulltext method will return results like "to", "tó", "tô", "tố", ect... But due to Filter of SearchBox, the result will be only "to". Please tell me how to turn off the Filter. The easiest way should be to set Filter="None" (just like with RadComboBox), but not available with SearchBox (currently with only StartsWith and Contains).
I would suggest Filter="None" in the next version.
Thank you.
6 Answers, 1 is accepted
In RadSearchBox you can use the OnDataSourceSelect server method to override the default filtering functionality with your custom logic.
Hope this will explain the issue.
Plamen
Telerik
Thank you for your suggestion. But I think that does not work.
My method already has the logic of searching/filtering with accent insentitive.
For example:
- When users type in ô, á, ê, my method DOES return records with characters like ô, á, ê and of cource also records with o, a, e, but the SearchBox can't just display records with o, a, e because of SearchBox Filter.
- When users type in o, a, e, my method DOES return records with characters like o, a, e and of cource also records with ô, á, ê, but the SearchBox can't just display records with ô, á, ê because of SearchBox Filter.
What I want is that the SearchBox DOES NOTHING with filter, just like Filter="None" with RadComboBox. I have tested my method with RadComboBox, and it works perfectly as I want.
Can you suggest me how to set SearchBox Filter off (server side or client side doesn't matter), but not with my custom method because there is nothing needed to modify it.
Thank you.
Any suggestion would be appreciated.
Thank you for providing the additional information.
Since RadSearchBox does not support Filter="None" property the only workaround for your scenario is to override the OnDataSourceSelect server method and remove the filtering from the code as I already mentioned or just use RadComboBox instead. Unfortunately there is no other workaround for the issue.
Plamen
Telerik
Thank you for your reply.
However, could you please go with further detail with "remove the filtering"? I cannot find the way how to remove it.
What I have done so far:
- Develop a custom control, which is inherited from RadSearchBox, but there is no DataSourceSelect method for override.
- The event OnDataSourceSelect as your suggestion, but cannot find the way how to remove the filtering.
- Extend the SearchBoxFilter enum to add None member, but without success.
Sorry for not able to catch your idea.
Thank you.
Please excuse me for not explaining the issue properly enough.
If you so not want the filter or you need some different filter you can change the command that is requesting the items as for example in the attached sample web page.
Hope this will be more helpful.
Plamen
Telerik