DataGridViewComboBox null values
I have a Windows forms DataGridView with a combobox column. The combo box column is bound to a data source that is populated from开发者_运维百科 a Linq to Entities query. I would like users to be able to select "Nothing" in the combo box (assign a value of NULL to the underlying data source).
How can I accomplish this?
DataGridView supports the Ctrl+0 keystroke to enter a null value into a cell, so you can use that to clear out a combo box's value and set it back to null.
精彩评论