Hi,
I am using Extended WPF Toolkit 2.0.0 and the DataGridControl. One of columns in the grid uses ComboBox as the cell editor (set up using Column.CellEditor). The Column is bound to a navigational property which can be null. The ComboBox's list of items is bound to a collection on ViewModel. It all displays and edits fine.
However, I cannot work out how to clear the value in the cell "properly". The cell can be empty, but the collection of items in the combo does not contain a "blank" value. Once I set the value in the cell, I cannot clear it. I have added a button next to the ComboBox in the cell to clear the property on the item bound to the row in the grid. It kind of works, but I have to save the changes and then refresh the grid to see that there is no value in the cell. I tried refreshing the ComboBox somehow, and the cell itself, calling OnPropertyChange, but no success.
I cannot add "null" to the list of items in the combobox - it fails then.
What is the "proper" way to do it? Clearing the cell's value when the editor is a ComboBox...?
I am using Extended WPF Toolkit 2.0.0 and the DataGridControl. One of columns in the grid uses ComboBox as the cell editor (set up using Column.CellEditor). The Column is bound to a navigational property which can be null. The ComboBox's list of items is bound to a collection on ViewModel. It all displays and edits fine.
However, I cannot work out how to clear the value in the cell "properly". The cell can be empty, but the collection of items in the combo does not contain a "blank" value. Once I set the value in the cell, I cannot clear it. I have added a button next to the ComboBox in the cell to clear the property on the item bound to the row in the grid. It kind of works, but I have to save the changes and then refresh the grid to see that there is no value in the cell. I tried refreshing the ComboBox somehow, and the cell itself, calling OnPropertyChange, but no success.
I cannot add "null" to the list of items in the combobox - it fails then.
What is the "proper" way to do it? Clearing the cell's value when the editor is a ComboBox...?