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

Combo Box Error - DataGridViewComboBoxCell value is not valid

$
0
0

I am trying to get the Combo Box working so that i can get the drop-down boxes available for the database columns to be placed in the DataGridView.

But i am getting the following error when the data displays in the DataGridView

 

The following exception occurred in the DataGridView:

System.ArgumentException: DataGridViewComboBoxCell value is not valid.

To replace this default dialog please handle the DataError event

 

Background:

The way i am selecting the 'Column Type' is through the Designer.

So i can choose the DataGridViewTextBoxColumn or DataGridViewComboBoxColumn.

The dataGridView is hooked up to a bindingSource and I have my bindingSource wired to a List Object. There is a dataTime picker control on the form, which is used to pull the data.

 

When i choose the DataGridViewTextBoxColumn, the data displays perfect.

But when i change the 'Column Type' to DataGridViewComboBoxColumn, running the form gives the error repeatedly and as i click on each error, one row of data displays and then the error again and so on.

 

Does anyone have a suggestion?


Viewing all articles
Browse latest Browse all 2535

Trending Articles



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