Editable DataGridComboBoxColumn

Jun 6, 2009 at 2:11 PM

I have an ObjectDataProvider whose ObjectInstance is set to a wrapper class containing an ObservableCollection. I want to have a combobox column which allows a user to select an item in the ObservableCollection or type a new one. So far the closest I've come is to use a TemplateColumn containing a ComboBox in the CellEditingTemplate, then use the LostKeyboardFocus to check the ObjectDataProvider's List to see if it contains the text entered. If not, add it.

I can add the text so it's visible and selectable if I go to re-edit the combobox or any other row's combobox, but the value I entered isn't selected the first time I commit and I'm not sure why.

Any suggestions?