I have combo as
<ig:XamComboEditor Name="YComboEditor" ItemsSource="{Binding Path=YearsData}" DisplayMemberPath="SomeYear" SelectionChanged="YComboEditor_SelectionChanged" SelectedItem="{Binding SomeYear,Mode=TwoWay,Converter={StaticResource YearConverter}}">
</ig:XamComboEditor>
This is populated correctly
I have IvalueConverter which checkes for the year and then should return current year as selected
For some reason the IValueconverter is not triggered
Any ideas?
<SomeYear> is the fieldname, Its valid binding target
The DisplayMemeberpath and selected item is same
I do not have the combo in grid
Its just the combo
The Years range from 1980-2014
I want the current year to be selected as default in the combo editor any pointers?
Hi,
in order for the ValueConverter to be triggered a valid binding should be used so the ValueConverter will have something to convert from/to. Is "SomeYear" valid binding target in your view model?
Looking at your xaml I am get the impression(the path for your SelectedItem binding is the same as the DisplayMemeberPath string) that you are trying to bind to a property of an ItemSource's item. Generally you should bind SelectedItem to a valid binding target.
You could check this sample which is showing how xamComboEditor is used with value converter in SelectedItem binding.
Regards