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

Do we have Multicolumn Combobox with filtering in Telerik WPF kit?

15 Answers 373 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Sandeep
Top achievements
Rank 1
Sandeep asked on 07 Dec 2012, 05:45 PM
Hi,

We are looking for a control which we can use for searching through multiple columns in a combo box. Use case is...as user types into the combo box, the data in the combo box should be auto filtered and when user selects a row using up/down keys and press enter, current row should be selected.

I can see that Telerik has a similar control for winforms but I am wondering if we have similar control for WPF too.

In our application we uses controls from 2 different vendors, where one vendor is telerik. I will check the availability of the similar control with other vendor too. But if Terelik can provide us such a inbuild control then it will be easy for us to move to Telerik only controls in future.

Thanks,
SK

15 Answers, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 12 Dec 2012, 01:10 PM
Hi Sandeep,

Thank you for contacting us.

I am not sure what you mean by searching through multiple columns in a combo box but in our Q3 2012 release of RadControls we introduced a new RadAutoCompleteBox control which has a built-in filtering, virtualization and auto complete functionality that could be useful in your scenario. You can see our demos for RadAutoCompleteBox here and our online documentation here.

It is worth mentioning that it is possible to customize the filtering feature of the control and change the way items are filtered.

If you have any other questions feel free to write to us again.

Kind regards,
Vladi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Sandeep
Top achievements
Rank 1
answered on 12 Dec 2012, 01:31 PM
Hi Vladi,

Search through multiple coumns means...if we are using a grid in a dropdown to display for e.g "Person" data in 4 columns (say Name, Age, Address, PhoneNumber) and when user start tying in to search one person then we have to search the user input text across all 4 columns displayed (i.e. Name/Age.Address/PhoneNumber) using the "contains" criteria and realtime filter the list displayed.

I have tried AutoCompleteBox as well. it seems that using this control we might be able to search across multiple columns at same time when user is typing But if user don't want to type and want to directly select using mouse then this control doesn't have a drop down button attached which the user can use to view the list and select item using mouse.

Is there any way to add DropDownButton in this AutoCompleteBox?

Thanks,
Sandeep
0
Vladi
Telerik team
answered on 12 Dec 2012, 03:27 PM
Hello Sandeep,

As I mentioned before you could customize the FilteringBehavior of the control which could be used to achieve the desired behavior. It is possible to customize it in a way that it returns the hole collection from the ItemsSource and drops the drop down portions of the control when there isn't a match from the filtering and when the control has the focus.

I created and attached a sample project for you showing how to achieve the described customization by creating a custom FilteringBehavior.

Regards,
Vladi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Guy
Top achievements
Rank 2
answered on 14 Dec 2012, 02:48 PM
Sandeep's last question was

"But if user don't want to type and want to directly select using mouse then this control doesn't have a drop down button attached which the user can use to view the list and select item using mouse.
Is there any way to add DropDownButton in this AutoCompleteBox?"

That would be a very useful feature for the RadAutoCompleteBox, seeing as the RadComboBox is unable to provide the custom filtering functions which can be added to the RadAutoCompleteBox via a FilteringBehavior.

Is there a simple way to add a drop down button to the RadAutoCompleteBox?
0
Vladi
Telerik team
answered on 15 Dec 2012, 09:26 AM
Hi Guy,

My example shows how to change the FilteringBehavior of the AutoCompleteBox in order to populate the drop down portion of the control with the hole ItemsSource collection which is done in the GotFocus event. You could customize the Template of the control to add a button and move the logic from the GotFocus event to the click event of that button to achieve the desired behavior.

By design in AutoCompleteBox there isn't a button that could be used in the manner described above but with a custom FilteringBehavior it is easily achieved.

Hope this is helpful.

All the best,
Vladi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Guy
Top achievements
Rank 2
answered on 18 Dec 2012, 07:44 AM
Hi Vladi

Thanks for this, I hadn't thought about changing the template of the control - that makes a lot of sense. I will give this a try today and see what I can come up with. If its reasonable I will post it here.

Thanks,

Guy
0
Sandeep
Top achievements
Rank 1
answered on 18 Dec 2012, 08:52 AM

To give this search control a Combo Box look as well as more control to me, I am now creating this control using a Textbox, RadDropDown and a Grid. Hopefully it won't take too long. I created a similar control 5 yrs back in winforms and thought things would have changed over time and might get a build-in control for this functionality.

Thanks Guys for useful discussion and information provided.

Cheers,
SK
0
Guy
Top achievements
Rank 2
answered on 19 Dec 2012, 06:31 AM
Hi guys

In my efforts to template the control nicely, I have a dropdown icon correctly displayed and responding to clicks. However, I am having trouble opening the RadAutoCompleteBox drop down in code. I assumed that setting IsDropDownOpen to True would open the dropdown, but it closes again immediately. Is there another way to open the dropdown (and keep it open)?

Thanks,

Guy
0
Vladi
Telerik team
answered on 20 Dec 2012, 02:20 PM
Hi Guy,

The IsDropDownOpen property currently has an existing issue that causes it to behave strangely. We are aware of this issue and will try to fix it as soon as possible.

As we see this is a scenario that could be useful for many we will do our best to create an example showing how to customize the AutoCompleteBox control and add a drop button that will populate the drop down portion of the control with the hole ItemsSource.

Kind regards,
Vladi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Guy
Top achievements
Rank 2
answered on 29 Dec 2012, 04:22 PM
Hi Vladi

Thanks, that would be great to see, and very helpful.

Regards,

Guy
0
Vladi
Telerik team
answered on 30 Jan 2013, 08:21 AM
Hi Guy,

We were able to put together a sample project for you showing how to create a drop down button for the RadAutoCompleteBox control.

You can find attached to my response a sample project that shows a solution for achieving the desired behavior. There are other possible solutions but the approach is similar to the one in the attached project. In it the main steps are creating a custom FilteringBehavior for the AutCompleteBox control and also creating a button that will make use of this new FilteringBehavior.

Hope this is helpful.

Regards,
Vladi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Guy
Top achievements
Rank 2
answered on 31 Jan 2013, 06:52 AM
Hi Vladi

That is exceptionally helpful, thank you! With this I've now been able to create an autocomplete combo box with custom filtering... perfect!

Thanks again, the service at Telerik really is amazing.

Regards,

Guy
0
Azar
Top achievements
Rank 1
answered on 03 Dec 2013, 07:52 AM
Hi

I am looking for the Multicolumn in the RadAutoCompleteBox.
the code showing us that this is having a single column display.
Is this possible to show multiple column in the same?

Please help

Regards
Azar Bhaladar

0
Vladi
Telerik team
answered on 03 Dec 2013, 01:49 PM
Hello,

We are not sure what exactly you mean by "Multicolumn in the RadAutoCompleteBox".

If you want to customize the template of the items in the drop down of the control you could create a custom DataTemplate and set it to the DropDownItemTemplate property.

Regards,
Vladi
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Bent
Top achievements
Rank 1
answered on 13 Nov 2017, 11:55 AM

To solve this, in the class I use for the items, I created an extra property named "Search" of type string. Then in XAML: TextSearch.TextPath="Search"

The "Search" field is calculated somewhat like this; FirstField + "|" + SecondField.ToString() + ...

I have used "|" as separator here, but try with a separator that isn't expected in the text, e.g. a control character, e.g. tab, if it works.

You can pretty much do anything when calculating the search string, e.g. translate colors to their names, in order to be able to search stuff that otherwise isn't searchable, or otherwise too hard to search for.

Tags
ComboBox
Asked by
Sandeep
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Sandeep
Top achievements
Rank 1
Guy
Top achievements
Rank 2
Azar
Top achievements
Rank 1
Bent
Top achievements
Rank 1
Share this question
or