I'm trying to build an editable combobox. This combobox in a datagrid. Binding is made with MVVM.
Everything works well except this : after typing a new value, this value is lost when going out of the combo.
Here is my code :
Everything works well except this : after typing a new value, this value is lost when going out of the combo.
Here is my code :
<xcdg:Column FieldName="FlangeType" Title="Flange Type" Width="80" >
<xcdg:Column.CellEditor>
<xcdg:CellEditor>
<xcdg:CellEditor.EditTemplate>
<DataTemplate>
<ComboBox
ItemsSource="{Binding Path= DataContext.FlangeTypes, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
SelectedValue="{xcdg:CellEditorBinding}"
Text="{Binding Path=DataContext.CurrentDrumStandard.FlangeType,UpdateSourceTrigger=LostFocus}"
IsEditable="True"/>
</DataTemplate>
</xcdg:CellEditor.EditTemplate>
</xcdg:CellEditor>
</xcdg:Column.CellEditor>
</xcdg:Column>
Thanks in advance for any help.