开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜