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

Multi column RadCombobox & Filter 'contains'

3 Answers 275 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Kristof
Top achievements
Rank 1
Kristof asked on 02 Oct 2008, 09:21 AM

My situation
I have a RadGrid where some columns contain RadComboBoxes.  These RadComboBoxes only display a code (mostly 3 characters), when they open they display two columns (the code and a description).

My RadComboBox is defined as follows:

<telerik:RadComboBox Width="65px" DropDownWidth="270" ID="radComboBoxVHT"   
   Filter="contains" AllowCustomText="true" HighlightTemplatedItems="true"   
   markfirstmatch="true" runat="server" EnableLoadOnDemand="true"   
   EnableScreenBoundaryDetection="true" DataSourceID="dataSourceVHT" DataTextField="Code"   
   DataValueField="Code" SelectedValue='<%#Bind("VHTCode") %>' > 
        <HeaderTemplate> 
            <table style="width:250px;" cellspacing="0" cellpadding="0">
             <tr> 
                    <td style="width:50px;">Code</td> 
                    <td style="width:200px;">Description</td> 
                 </tr>
             </table>  
        </HeaderTemplate> 
        <ItemTemplate> 
            <table style="width:250px;" class="comboTable" cellspacing="0" cellpadding="0">  
                <tr> 
                    <td style="width:50px;">  
                        <div class='comboItem'>  
                            <%#DataBinder.Eval(Container.DataItem, "Code")%> 
                        </div> 
                    </td> 
                    <td style="width:200px;">  
                        <div class='comboItem'>  
                            <%#DataBinder.Eval(Container.DataItem, "Description")%> 
                        </div> 
                    </td> 
                </tr> 
            </table> 
        </ItemTemplate> 
</telerik:RadComboBox> 

The problem
When the user starts typing in the combobox, it's only filtering on the first column (Code).  I also wants it to filter on the second column.  In fact: on both columns.

Example I have following two items in the combobox:

REQ | Send a request
FIN | Require finishing

When the user starts typing "req" I still want to see both items, and not only the first.

3 Answers, 1 is accepted

Sort by
0
Accepted
Yana
Telerik team
answered on 02 Oct 2008, 01:39 PM
Hello Kristof,

Please check the attached sample project which demonstrates the needed approach. Download it and give it a try.

Greetings,
Yana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Azim
Top achievements
Rank 1
answered on 05 Mar 2013, 11:38 AM
Hello Telerik Team,
i have radcombo working with Filter="Contains" , but it is failing while user adding custom text in to combo box (which is not in combo), it is not validating , and returns empty.string in Code Behind.
any Solutions how can i validate?

Thanks in Advance !

<telerik:RadComboBox ID="rcbCallTransfer" Runat="server" Filter="Contains" EnableLoadOnDemand="true" AutoPostBack="true
EmptyMessage="Select Employee" AllowCustomText="false" MarkFirstMatch="true"
EnableTextSelection
="true"  OnSelectedIndexChanged="rcbCallTransfer_OnSelectedIndexChanged">
                            </telerik:RadComboBox>
0
Hristo Valyavicharski
Telerik team
answered on 08 Mar 2013, 09:35 AM
Hi Azim,

The provided information is not sufficient in order to determine what might caused the issue.  We will need more details about your scenario. Under which browser you had faced the issue and what is the version of Telerik assemblies that you are using? If you could provide us with a sample reproducing the problem or a code snippet demonstrating the entire implementation of the RadComboBox, it would be great appreciated. 

All the best,
Hristo Valyavicharski
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ComboBox
Asked by
Kristof
Top achievements
Rank 1
Answers by
Yana
Telerik team
Azim
Top achievements
Rank 1
Hristo Valyavicharski
Telerik team
Share this question
or