Does anybody know how I can bind the XamComboEditor to my viewmodel? I have a collection of objects databound to the combo which is working fine, however I can't seem to bind the selected to value to a property on my model object.
On the standard combo and on teleriks combo there are SelectedValue and SelectedValuePath properties which enable the mapping of a property from the selected item to a property on my Model.
Below is an example of how I databind using the standard silverlight combo box:
<ComboBox ItemsSource="{Binding InstructionSources}" DisplayMemberPath="Name" SelectedValuePath="InstructionSourceId" SelectedValue="{Binding Model.InstructionSourceId, Mode=TwoWay}" />
Hi,
sorry for the late late response.
Since at the moment XamComboEditor control does not provide the functionality you need we have come up with a workaround for it. In a nutshell you need to inherit the combo and implement SlectedValue and SelectedValue properties.
For more details check this forum thread out.
I suppose the same approach is applicable to the multi selection mode.
Regards,
I am curious about the same thing for multiselect, how do I bind a multiselect to the VM, SelectedItem = "{Binding}" works for one record what about multiple? SelectedItems is only a getter!