views:

371

answers:

1

I have a Silverlight datagrid where two of the columns are comboboxes. One of the comboboxes is bound to an unchanging Dictionary and is displaying the list of Keys. For the other combobox, I want to populate it with a hardcoded list of strings based on the Value of the selected item in the first combobox.

A little more context - the Values in the dictionary are strings but they will only have a few different values. There may be 100 keys in the Dictionary but all the values will be either "one", "two" or "three". If a user chooses an item where the Value is "one", the combobox in the other column should let you choose from "Un" and "Uno". If the user chooses an item where the Value is "two", the combobox in the other column should let you choose from "Dos" and "Deux". And so on. The list of values to display is well-known and hard-coded, but it can be represented any way that is convenient - as a Converter or whatever.

How can I do this?

A: 

Was thinking about this wrong. Got it to work by binding the second combobox to the property on the object that the first combobox is setting, and using a converter to convert that value. Looks like I've got a ways to go before I'm thinking in WPF/XAML.

nlawalker