Ticket T853467
Visible to All Users

How to filter Lookup Combo Box by a certain field

created 5 years ago (modified 5 years ago)

[DevExpress Support Team: CLONED FROM A344: How to filter lookup records using another cells value as a condition]

I was trying to use "Way 2" (directly filter the dropdown lookup Grid) but I ran into a  problem. The values I'm using to filter on are in the dataset that drives the lookup grid but it looks like I can't use them in the filter unless I add those to the list columns in the lookup grid.  Is this correct? For example, in your Medication demo for this, you filter the medication name dropdown based on medication class. You can do that because ClassID is one of the list columns. What if I don't want to see ClassID there? In my application I do not want to show the columns I'm using to filter on. And there doesn't appear to be a way to add a column and make the column not visible. Is there a way to use the filter to access fields in the dataset that are not in a column in the grid?

Answers approved by DevExpress Support

created 5 years ago

You are right. You need to add a new column and link it to your field to be able to filter by the field's values.
Although columns do not have the Visible property, you can set their MinWidth and Width properties to 0 to visually hide them.

    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.