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

RadComboBox autocomplete - Search in any place

15 Answers 594 Views
ComboBox and ListBox (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
macmariman
Top achievements
Rank 2
macmariman asked on 10 Jun 2009, 01:45 PM
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.

15 Answers, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 10 Jun 2009, 05:05 PM
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.
0
macmariman
Top achievements
Rank 2
answered on 10 Jun 2009, 05:12 PM
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.
0
Nick
Telerik team
answered on 12 Jun 2009, 08:14 AM
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.
0
Stefan Plattner
Top achievements
Rank 1
answered on 21 May 2010, 09:51 AM
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 ...

0
Victor
Telerik team
answered on 25 May 2010, 04:59 PM
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.
0
NORIS
Top achievements
Rank 1
answered on 21 Jul 2010, 09:54 PM
This is functionality now available in Q2 DropDownList?
Thanks.
0
Victor
Telerik team
answered on 22 Jul 2010, 12:32 PM
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
0
NORIS
Top achievements
Rank 1
answered on 24 Aug 2010, 02:27 PM
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.
0
Peter
Telerik team
answered on 27 Aug 2010, 11:55 AM
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
0
NORIS
Top achievements
Rank 1
answered on 17 Sep 2010, 05:04 PM
Hello,
I did not see this feature mentioned in the Q2 2010 SP2 history release and was wondering if it was added.
Thanks.

0
Peter
Telerik team
answered on 23 Sep 2010, 07:09 AM
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
0
Dmitry
Top achievements
Rank 1
answered on 29 Dec 2010, 11:11 AM
Hi,

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

Thanks. 
0
Peter
Telerik team
answered on 29 Dec 2010, 06:26 PM
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.
0
NORIS
Top achievements
Rank 1
answered on 05 Mar 2012, 06:42 PM
Is this still the only way to do a "contains" search in a RadDropDownList? Or has a new way been added?
Thank you
0
Peter
Telerik team
answered on 08 Mar 2012, 03:47 PM
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 >>
Tags
ComboBox and ListBox (obsolete as of Q2 2010)
Asked by
macmariman
Top achievements
Rank 2
Answers by
Nick
Telerik team
macmariman
Top achievements
Rank 2
Stefan Plattner
Top achievements
Rank 1
Victor
Telerik team
NORIS
Top achievements
Rank 1
Peter
Telerik team
Dmitry
Top achievements
Rank 1
Share this question
or