I have a combo box (in my wpf-mvvm app). I have set IsEditable = true
. But the "property changed event" is getting fired when I start typing.
How can I set UpdateSourceTrigger = Propertychanged
here ?
Also..I need to call a validation function if user has entered new value ( i mean other than those available in list ..using edit functionality).
Any help will be appreciated.
<ComboBox ItemsSource="{Binding Path = PlanTypeBasedContractNumberList }" Width="90" IsEditable="True"
SelectedValue="{Binding GeneralCharacteristicsDataContext.ContractNumber.Value}">
</ComboBox>
In an editable
ComboBox
, theSelectedItem
andSelectedValue
properties refer to thePopup
items, not the editable item. Once you start typing, theSelectedItem
becomes "unselected" and that's why the event fires.To bind to the value of the
TextBox
of theComboBox
, use theText
property: