Ticket T935015
Visible to All Users

How to show correct Filter Dropdown values in a column with a custom CellDisplayTemplate

created 4 years ago

Hi DevEx,

I have a table with a foreign key to display. All readable values from this other table are displayed in a ComboBoxEdit. When using a CellDisplayTemplate the values in the column header filter popup are the ValueMembers instead of the DisplayMembers. When using ComboBoxEditSettings the FilterPopup looks fine. How can I fix this?
I attached a small sample showing this behavior.

Best regards,
Daniel

Answers approved by DevExpress Support

created 4 years ago

Hello Daniel,

CellDisplayTemplate does not affect data filtering, similar to CellTemplate. Please check the following topic where we compared CellTemplate with other ways to customize display text - Format Cell Values.

If the EditSettings property meets your requirements, I recommend you continue using it. This technique is the best in terms of performance and compatibility with other features. Otherwise, combine CellDisplayTemplate/CellEditTemplate with other techniques that affect filtering. For example, use CellEditTemplate along with EditSettings.

Thanks

    Comments (2)

      Hi Ivan,

      I wasn't aware that EditSettings and CellEditTemplate can be used together.
      That work just fine for my case.
      Thanks for your help.

      Best regards,
      Daniel

      Andrey Marten (DevExpress Support) 4 years ago

        Hello Daniel,

        We believe that the scenario that we discussed in this thread can be helpful to other customers. Therefore, we included a link to this thread into our Tips & Tricks (October 2020) blog post. You might be interested in other situations that made it to this list.

        Feel free to leave a comment and share your thoughts and feedback.

        Thanks,
        Andrey

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.