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

multi-field search in mluticolumn - Combo

1 Answer 60 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 14 Dec 2012, 09:10 AM
Hi,

I'd like to use a multicolumn Combo for search reasons.
Here's my current configuration (based on this demo) :

ASPX:
<telerik:RadComboBox ID="rb_fvCustomer" runat="server"
                                    DataSourceID="Customers" EnableAutomaticLoadOnDemand="true" ItemsPerRequest="10"
                                    DataTextField="name" DataValueField="kundennummer"
                                    EnableVirtualScrolling="true" ShowMoreResultsBox="true" Width="190px" HighlightTemplatedItems="true">
                                    <HeaderTemplate>
                                        <table style="font-size: 10px">
                                            <tr>
                                                <td style="width: 140px;">Name</td>
                                                <td style="width: 200px;">Kundennummer</td>
                                            </tr>
                                        </table>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <table style="font-size: 10px">
                                            <tr>
                                                <td style="width: 140px;">
                                                    <%# DataBinder.Eval(Container.DataItem, "name")%>                                                 
                                                </td>
                                                <td style="width: 200px;">
                                                   <%# DataBinder.Eval(Container.DataItem, "kundennummer")%>
                                                </td>
                                            </tr>
                                        </table>
                                    </ItemTemplate>
                                </telerik:RadComboBox>



DataSource Definition:
<asp:LinqDataSource ID="Customers" runat="server" ContextTypeName="DataAdapterRR.CustomerDB_ConnectorDataContext"
        OrderBy="name" TableName="kp_customerdata">
    </asp:LinqDataSource>

Nothing happeing in code behind.
The sarch on the datavalue works and data is shown in the dropdown.
Is there a way I can make the combo to search in all colums but display only the "name" once selected?

1 Answer, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 18 Dec 2012, 02:25 PM
Hello Michael,

Thank you for contacting Telerik Support.

I can suggest you to use the Filter property of the RadComboBox, in order to be able to search in both columns of the control. Here you could find our online demo, demonstrating the behavior of the RadComboBox, when the Filter property is used.

Hope this information helps. I will be glad to assist you any further.


Regards,
Nencho
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
Michael
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Share this question
or