RadComboBox autocomplete - Search in any place

16 posts, 0 answers
  1. macmariman
    macmariman avatar
    10 posts
    Member since:
    Apr 2008

    Posted 10 Jun 2009 Link to this post

    Hi guys,

    I'm trying to use a RadComboBox (window) in the main form of an application I'm developing.
    As far a as I can see the autocomplete mode uses the entered text to filter those items starting with this text. I would like to go beyond this functionality by filtering those items which contains the entered text, not only at the begining but also in any place.

    As an example, if I have a combobox containing cities and I write "lon" it should filter, not only "london" city but also "barcelona" (among others cities matching the filter).

    Thanks in advance,

    Martin.

  2. Nick
    Admin
    Nick avatar
    767 posts

    Posted 10 Jun 2009 Link to this post

    Hello macmariman,

    Thank you for your suggestion. We will consider adding such a filter, although it seems a bit unnatural. Perhaps we may add custom filters that you can specify yourself and hence achieve such scenarios.  

    Greetings,
    Nick
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. macmariman
    macmariman avatar
    10 posts
    Member since:
    Apr 2008

    Posted 10 Jun 2009 Link to this post

    Okay, thank you for your response.
    Actually, it was not only a suggestion but also a question about how to carry out this functionality.

    Is there any workaround to solve this issue ?

    Thanks,

    Martin.
  5. Nick
    Admin
    Nick avatar
    767 posts

    Posted 12 Jun 2009 Link to this post

    Hello macmariman,

    Well, currently no since this functionality is internal and therefore cannot be easily overridden. 

    Greetings,
    Nick
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Stefan Plattner
    Stefan Plattner avatar
    4 posts
    Member since:
    Jul 2012

    Posted 21 May 2010 Link to this post

    Any news on this?

    Actually, I was surprised that this isn't possible. I have many cases where it makes perfectly sense.

    For example, sometimes names of projects are written in a certain way and the "keyword" is somewhere inside the string. Or when there are many items that start with the same characters:

    - The Beatles
    - The Simpsons
    - The ...

  7. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 25 May 2010 Link to this post

    Hello Stefan Plattner,

    Thank you for writing.

    This functionality has not yet been implemented. Currently, we are working on a completely new combo box control which will provide this functionality and will improve the current RadComboBox in several directions, namely performance, extensibility and auto complete mode.

    Write again if you have other questions.

    Greetings,
    Victor
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  8. NORIS
    NORIS avatar
    29 posts
    Member since:
    Jun 2009

    Posted 21 Jul 2010 Link to this post

    This is functionality now available in Q2 DropDownList?
    Thanks.
  9. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 22 Jul 2010 Link to this post

    Hi NORIS,

    Thank you for writing.

    This functionality is indeed incorporated in RadDropDownList but currently it is a little awkward to extend it. Here is how you can achieve this:

    First define a class that extends the default AutoCompleteHelper

    public class CustomAutoAppendHelper : AutoCompleteAppendHelper
    {
        public CustomAutoAppendHelper(RadDropDownListElement dropDown)
            : base(dropDown)
        {
        }
     
        protected override bool  DefaultCompare(RadListDataItem item)
        {
            // The FindString property will return the string that was typed in the text box part of RadDropDownList.
            return item.Text.Contains(this.FindString);
        }
    }

    Second, create an instance of your class and assign it to RadDropDownListElement
     
    this.radDropDownList1.AutoCompleteMode = AutoCompleteMode.Append;
    this.radDropDownList1.DropDownListElement.AutoCompleteAppend = new CustomAutoAppendHelper(this.radDropDownList1.DropDownListElement);

    Please note that this is not available in the official release since there is no FindString property in the AutoCompleteSuggest helper. This will be available in the internal build that will be released later today.

    We will add a simpler way to change the comparison of the auto complete logic in the Q2 2010 SP1 release and will make the mechanism more extensible. SP1 is expected in 3 weeks.

    Please write again if you have other questions.

    Greetings,
    Victor
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  10. NORIS
    NORIS avatar
    29 posts
    Member since:
    Jun 2009

    Posted 24 Aug 2010 Link to this post

    Hello Victor,
    From your statement:
    "We will add a simpler way to change the comparison of the auto complete logic in the Q2 2010 SP1 release and will make the mechanism more extensible."

    Can you tell me if this was done? I guess I was expecting to see a new option in the AutoCompleteMode.
    What is the "simpler way"?
    Thanks.
  11. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 27 Aug 2010 Link to this post

    Hello NORIS,

    Thank you for writing us back. We plan to add  a new event that will allow users easy to define custom comparison. This event is not included in our latest service pack, we will try to add it in our next service pack in the beginning of September.

    Currently you can do this by using the method that my colleague demonstrated: You should inherit AutoCompleteAppendHelper and override its DefaultCompare function. 

    We will appreciate it, if you share with us your ideas or suggestions on how to improve our API.

    Don't hesitate to contact us if you have other questions.

    Sincerely yours,
    Peter
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  12. NORIS
    NORIS avatar
    29 posts
    Member since:
    Jun 2009

    Posted 17 Sep 2010 Link to this post

    Hello,
    I did not see this feature mentioned in the Q2 2010 SP2 history release and was wondering if it was added.
    Thanks.

  13. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 23 Sep 2010 Link to this post

    Hi NORIS,

    Thank for the writing.

    We did not manage to release this feature in the SP2 release, because we want to make sure that it passes the necessary QA cycles before being released.

    At this time, you should still inherit AutoCompleteAppendHelper and override its DefaultCompare function.

    Do not hesitate to contact us if you have additional questions.

    Regards,
    Peter
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  14. Dmitry
    Dmitry avatar
    1 posts
    Member since:
    Dec 2010

    Posted 29 Dec 2010 Link to this post

    Hi,

    I am also looking for such a functionality, has it been implemented? 

    Thanks. 
  15. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 29 Dec 2010 Link to this post

    Hi macmariman,

    Thank you for writing.

    Such functionality will be incompatible with the AutoSuggestAppend mode and that is why we do not support it. Nevertheless, you can implement a custom CustomAutoAppendHelper and override its DefaultCompare method. Please refer the following thread post for more details.

    Hope this helps. If you need further assistance, please do not hesitate to ask.

    Greetings,
    Peter
    the Telerik team
    Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
  16. NORIS
    NORIS avatar
    29 posts
    Member since:
    Jun 2009

    Posted 05 Mar 2012 Link to this post

    Is this still the only way to do a "contains" search in a RadDropDownList? Or has a new way been added?
    Thank you
  17. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 08 Mar 2012 Link to this post

    Hello Noris,

    Thank you for writing.

    In Q3 2011 SP1 we introduced a new property named SuggestMode that manages the AutoCompleteSuggest behavior:

    radDropDownList1.DropDownListElement.AutoCompleteSuggest.SuggestMode = SuggestMode.Contains

    Do not  hesitate to contact us if you have other questions.

    All the best,
    Peter
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Back to Top
UI for WinForms is Visual Studio 2017 Ready