Click here to Skip to main content
15,885,309 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

In my application I have two datagridviews with the following:
- Both datagridviews are bound
- Both these datagridviews have a column called 'Message Type'.
- Both these columns are comboboxcolumns
- Both comboboxcolumns are bound to BindingSourceXML_MESSAGE_TYPE (MessageType)

The moment I start/debug my application i get 'System.ArgumentException: DataGridViewComboBoxCell value is not valid'

If I change the columntype for any one of the two datagridviews back to a normal textbox and I start/debug then it opens/debugs without problems.

It is as if the BindingSourceXML_MESSAGE_TYPE does not want to be "shared" between datagridviews.

Any advice?
Posted
Updated 26-Jun-13 2:31am
v2
Comments
ledtech3 26-Jun-13 9:39am    
Without seeing how you fully implemented the code, can you Change the column name of one of the data grid views but still be bound to the same source?

Say like one has a name like MessageType1,'Message Type' and the other is MessageType2,'Message Type'
RicoStrydom 27-Jun-13 1:37am    
I did the following: I changed the column name of my second table to MSMessageType, I removed the table from my Dataset, I removed the Table Adapter, I removed my Binding Source and Datagridview. I then start fresh by adding the Table to the dataset, and then bound the datagridview again with the whizzrd. Still I get the same error message.

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900