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

Combobox in DataGridView problem with autocomplete

$
0
0

Hi all

I have created a datagridview connected to a sql dataset with tableadapter and bindingsource as normal.

The two last columns in the datagridview are comboboxes for the user to select from a list.

When adding a row these columns need to be set in the underlying data. Nulls are not allowed.

If the user clicks the final drop down and selects a value then tabs out of the row the data is updated in the local dataset correctly and can be updated to the sql server.

If however the user uses autocomplete and tabs out of the row. The combobox displays the value but when he tabs out the update fails as the row passes a null value to the dataset.

With the penultimate column autocomplete works fine.

Can anyone please enlighten me as to what I am missing here?

Thanks


Viewing all articles
Browse latest Browse all 2535

Trending Articles



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