How can I set Filter to None?

7 posts, 0 answers
  1. BiBongNet
    BiBongNet avatar
    27 posts
    Member since:
    May 2010

    Posted 17 Aug 2013 Link to this post

    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.


  2. Plamen
    Admin
    Plamen avatar
    2733 posts

    Posted 21 Aug 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. BiBongNet
    BiBongNet avatar
    27 posts
    Member since:
    May 2010

    Posted 21 Aug 2013 Link to this post

    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.
  5. BiBongNet
    BiBongNet avatar
    27 posts
    Member since:
    May 2010

    Posted 24 Aug 2013 Link to this post

    There is no way to solve this?

    Any suggestion would be appreciated.
  6. Plamen
    Admin
    Plamen avatar
    2733 posts

    Posted 26 Aug 2013 Link to this post

    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.
  7. BiBongNet
    BiBongNet avatar
    27 posts
    Member since:
    May 2010

    Posted 26 Aug 2013 Link to this post

    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.
  8. Plamen
    Admin
    Plamen avatar
    2733 posts

    Posted 29 Aug 2013 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017