Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

datagridview with combobox saving value

$
0
0

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?


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>