Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to filter a LookUpEdit in one column based on the value of another column

$
0
0

This example illustrates how to filter LookUpEdit item source values in one column based on the value of another column. This functionality can be implemented only when a filtered LookUpEdit is introduced using a cell template. In this case, every cell has an independent LookUpEdit editor, and we can manipulate its item source. The item source is filtered in the TableView.ShownEditor event handler. This event is raised when a cell gets focus, and its editor becomes active, so it is the best place to filter the item source.

Question Comments

Added By: David Stewart DK at: 1/2/2013 2:11:18 PM    

Notice that in the code below, the Name of the LookUpEdit MUST be "PART_Editor". This particular bit of magic was not clear to me...

/David

Added By: ArunKallingal at: 12/26/2013 5:07:38 AM    

Actually i want this in mvvm concept

Added By: Thomas R Melinsky at: 5/2/2014 4:47:23 AM    

I have compiled this with 12.2.8 and 13.2.7, and it has odd behavior with both.  Sometimes when viewing the cities list, there will only be one item in the list, the chosen city.  Other times when viewing the same city list (or another list item that has the same country selected), it will display all of the city choices.  Is it possible to fix the example as I was planning on using it as a reference?

Added By: Elliot (DevExpress Support) at: 5/2/2014 5:14:23 AM    

As an immediate solution, you can use the approach described in the E2163 code example to avoid this problem. Does it work for you?


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>