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

RadComboBox multicolumn filtering

2 Answers 255 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Giereck
Top achievements
Rank 1
Giereck asked on 26 Oct 2009, 02:43 PM
Hello!

Im using a RadComboBox to display some product names. I want to show the status of the product and the product name in the dropdown, so I use a template to show an icon (active, not active) and then the name.

I have enabled AllowCustomText and Filter=Contains, and when i type in some text in the combobox it filters the content as intented and highlight the correct item. However, I also want to be able to filter on some keywords attached to the products, so my first question is: Can I somehow filter on both the product name (which the user sees) AND a set of keywords (which the user does not see)?

My "plan B" was to add another column to the template where I actually show the keywords, but then again, when i enter a custom text in the combobox it only filters on that one columns text (product name). So the second question (if there is no simple answer to the first question): Can the combobox filter on multiple columns?

Hope my description was clear enough.

\Giereck

2 Answers, 1 is accepted

Sort by
0
Accepted
Simon
Telerik team
answered on 29 Oct 2009, 09:56 AM
Hello Giereck,

No, RadComboBox filters only the Text of Items. One of the reasons for this is that the 'Filter' functionality actually highlights the portion of the Text that matches.

In case you have other properties (Value, Attributes, etc.) that need to be matched, the Filter functionality will not be appropriate as no text can be highlighted. 

Perhaps, Load on Demand will be more useful in your case. In the server-side Items filtering logic you can filter Items by a set of criteria and show only them in the ComboBox. The Template will also be loaded normally.

Please see the approach in action in this demo.

Best wishes,
Simon
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Giereck
Top achievements
Rank 1
answered on 02 Nov 2009, 03:23 PM
Hello Simon,

Thank you for your answer! That was exactly what I needed :-)
Cheers!

/Giereck
Tags
ComboBox
Asked by
Giereck
Top achievements
Rank 1
Answers by
Simon
Telerik team
Giereck
Top achievements
Rank 1
Share this question
or