2 (or more) ComboBoxes dependent on each other

Posted by Mcad001 on Stack Overflow See other posts from Stack Overflow or by Mcad001
Published on 2010-06-09T10:59:28Z Indexed on 2010/06/09 11:32 UTC
Read the original article Hit count: 204

Hi,

I have an Organisation entity and a Region entity. An object of type Organisation can have one or more Region objects connected to it, thus I have a foreign key in my Region entity to the Organisation Entity. The Organisation and Region objects are pulled from my database using WCF RIA and entity framework. I want to put the Organisation objects in one ComboBox and the Region objects in another ComboBox, and when selecting an organsation having the ComboBox for Region objects automatically only showing regions that are connected to the selected organisation. Should be pretty basic, but the way I've designed it right now it doesnt work at all.

So, any hint to how I can achive this? A simple simple codeexample is much appreciated! (I'm using SL4,WCF RIA MVVM)

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about databinding