views:

1030

answers:

1

I am using the WPF Toolkit DataGrid bound to Person collection. The LastName is represented by the ComboBox with wellknown names.

<x:Array x:Key="knownLastNames" Type="sys:String">
    <sys:String>Johnson</sys:String>
    <sys:String>Williams</sys:String>
</x:Array>

The problem is that if I set LastName to "Brown" (missed in knownLastNames), the ComboBox column is empty.

<dg:DataGridComboBoxColumn Header="LastName" TextBinding="{Binding LastName}" ItemsSource="{Binding Source={StaticResource knownLastNames}}" />

If I make the ComboBox editable, I can see "Brown", but only when in edit mode (pressed F2).

A: 

This is a bug that I have already raised in the forums and confirmed via email with Vincent (a coordinator on the project). I ended up writing my own custom column type just so I could do editable ComboBoxes.

HTH, Kent

Kent Boogaart