Filtering to use both DataTextField and DataValueField

3 posts, 0 answers
  1. Jason
    Jason avatar
    2 posts
    Member since:
    Aug 2019

    Posted 23 Aug 2019 Link to this post

    I'm using the RadComboBox to display a list of reports to a user. The reports have and ID and Name which are bound as such DataTextField="Text" DataValueField="ID".


    The ID of the report is not useful to the end user so we don't want to display the Report ID in the text. However, our site admins and client services people who know the Reports best by ID wish to be able to type the Report ID to filter it this way. 


    Is it possible to provide such custom filtering? 



  2. Jason
    Jason avatar
    2 posts
    Member since:
    Aug 2019

    Posted 23 Aug 2019 in reply to Jason Link to this post

    Managed to resolve this by using an ItemTemplate. It puts both items into the ComboBox item but the report portion is hidden using display: none; css. 


        <span><%# DataBinder.Eval(Container.DataItem, "Text")%></span>
        <span style="display: none;"><%# DataBinder.Eval(Container.DataItem, "ID")%></span>
  3. Peter Milchev
    Peter Milchev avatar
    658 posts

    Posted 28 Aug 2019 Link to this post

    Hello Jason,

    For convenience and better visibility from the community, I am sharing other options to achieve filtering on many columns:

    1) Using the Load on Demand functionality and filter the events server-side in the OnItemsRequested event. 

    Here are some resources related to the suggested approach:

    2) Using the MultiColumnComboBox control and its FilterFields functionality: 

    Peter Milchev
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top