I have only just began to use Entity Framework in VS2010 so apologies for being so basic. I’m sure this question has been asked on here before but I just can’t decode the answers into what I’m looking for.
I have 4 drop down boxes, all bound to the same source (the table Locations)
cmbBin is bound to Locations and displays Locations.Bin
cmbRoom is bound to Locations and displays Locations.Room
cmbBuilding is is bound to Locations and displays Locations.Building
cmbSite is bound to Locations and displays Locations.Site
As one bin can be in >1 room, and that room name could be in > 1 building and so on i’m trying to display the results as follows
ALL bins are displayed in the first combo/dropdown box. In whatever Rooms, Buildings and Sites this bin appears in, populate the remaining dropdowns WITHOUT repeating (i.e. There may be 1000 items in Room “1A” and I just want “1A” displayed once rather than a thousand times).
It’s bound to be something obvious but I just can’t figure it out. Any ideas?
Solved. Gave up on the data binding and did a manual bind (alter the other dropboxes when first dropbox has changed) and slapped .Distinct on the end.