Filter and wildcards

4 posts, 0 answers
  1. Vlad
    Vlad avatar
    19 posts
    Member since:
    Aug 2012

    Posted 20 Dec 2012 Link to this post

    Hi!

    We are using a RadComboBox with filter="contains" with a webservice supplying results on demand. All is working well. However, lately, we have changed our search to use Lucene.NET indexing and not Database queries.
    Now. Lucene.NET allows wildcards in queries, and this is where problems begin. Webservice returns a set of results, but RadComboBox doesn't display them due to Filter being set to Contains. If I remove Filter property, results are displayed, but not highlighted.
    Also, Lucene.NET has it's own highlighter, which I tried to use mimicking what RadComboBox does, when filter is set, but to no avail, as em tag is apparently stripped form RadComboBoxDropDown when filter is not set. I also tried to use custom html tag, but that then gets displayed in combobox input field, which I don't want.

    Is there a way of either implementing wildcards in RadComboBox filter or a way to override em stripping so that I can use Lucene.Net highlighter.
  2. Vlad
    Vlad avatar
    19 posts
    Member since:
    Aug 2012

    Posted 07 Jan 2013 Link to this post

    So no idea what so ever?
  3. Cat Cheshire
    Cat Cheshire avatar
    128 posts
    Member since:
    Jun 2010

    Posted 10 Jan 2013 Link to this post

    You can try implementing Server-Side Load On Demand and query the database from server-side.
    Take a look at the GetData method implementation here - http://demos.telerik.com/aspnet-ajax/combobox/examples/populatingwithdata/autocompletesql/defaultcs.aspx
    You can detect whether the user has typed a wildcard and change the Select query accordingly.
  4. Vlad
    Vlad avatar
    19 posts
    Member since:
    Aug 2012

    Posted 15 Jan 2013 Link to this post

    Server-side event handling for Auto complete? I think I have to say: 'Thanks, but no, thanks'.

    Anyway I sorted it out by doing my own parsing on ClientSelectedChanged event. However, then, there was a problem with text displayed if you selected an item via keyboard (no client event for handling that is a really really nice feature, btw), so I set ChangeTextOnKeyBoardNavigation property to' false'.
Back to Top