This is what I want:
- There is a combo-box column bound to the ApplicationKey property of ClassA.
- ClassA.ApplicationKey is a
Nullable<Int32>
- The combo-box is populated with ApplicationTokens from a static function all.
- An ApplicationToken has a ApplicationName and ApplicationKey property
- When an item is selected in the drop-down, the ClassA.ApplicationKey property is set to the ApplicationToken.ApplicationKey on the selected item.
- The "None" option is currently represented by a Null. This can be changed.
Current code
<DataGridComboBoxColumn
Header="Application"
SelectedValueBinding="{Binding ApplicationKey}"
SelectedValuePath="ApplicationKey"
DisplayMemberPath="ApplicationName"
ItemsSource="{Binding Source={x:Static app:ApplicationLookup.GetAllOrNone}}"/>
Currently the binding works, except that I cannot select the "None" item from the list. The combobox shows it, but doesn't do anything when I try to select it with the mouse.
What is the standard way to offer none in a bound combo-box?