This is a migrated thread and some comments may be shown as answers.

How can I set Filter to None?

6 Answers 69 Views
SearchBox
This is a migrated thread and some comments may be shown as answers.
BiBongNet
Top achievements
Rank 2
BiBongNet asked on 17 Aug 2013, 10:30 PM
Hi,

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

Sort by
0
Plamen
Telerik team
answered on 21 Aug 2013, 06:51 AM
Hi,

 
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.

Regards,
Plamen
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
BiBongNet
Top achievements
Rank 2
answered on 21 Aug 2013, 08:35 AM
Hi Plamen,

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.
0
BiBongNet
Top achievements
Rank 2
answered on 24 Aug 2013, 06:49 AM
There is no way to solve this?

Any suggestion would be appreciated.
0
Plamen
Telerik team
answered on 26 Aug 2013, 08:41 AM
Hello ,

 
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.

Regards,
Plamen
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
BiBongNet
Top achievements
Rank 2
answered on 26 Aug 2013, 02:11 PM
Hi Plamen,

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.
0
Plamen
Telerik team
answered on 29 Aug 2013, 12:21 PM
Hello,

 
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.

Regards,
Plamen
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
SearchBox
Asked by
BiBongNet
Top achievements
Rank 2
Answers by
Plamen
Telerik team
BiBongNet
Top achievements
Rank 2
Share this question
or