Hi,
I have a data grid with a DataGridViewComboBoxColumn on it. The combobox takes its data from a data table (ORDE) with the columns ID and NAAM. In the source table there is a column ORDE_ID. If you click on the combobox you will see the name (NAAM) of the ORDE
table and if you save the corresponding ID will be saved in the source table. I am unable to save an empty value in the cell with the combobox. Then there will be an error saying that a dbnull value must be saved. Adding an empty line to the ORDER table does
not solve anything because if the value shown is empty, you cannot select.
How can you save a dbnull value if the combobox shows no value?
↧
datagridview with combobox saving value
↧