Reputation: 1940
I have a GridView with a data source (automatically generated from Visual Studio's designer). The datasource automatically creates the Columns in the GridView, this part is all working fine.
The problem is that i want to change the type of that column from DataGridViewTextBoxColumn
to DataGridViewComboBoxColumn
, i do that like this:
After changing this, i get an error loading the grid:
System.ArgumentException: DataGridViewComboBoxCell value is not valid.
The type of the column is SQL is varchar(50).
The only code i'm using is to bind the DataSet to the GridView:
this.tasksTableAdapter.Fill(this.tasksDataSet.Tasks, user.ID);
Any advice would be greatly appreciated
Upvotes: 0
Views: 1846
Reputation: 1940
After some more trying i found the answer. I had to select the same DataSource for the ComboBox as i used for the DataGrid. doing this and setting DisplayMember and DataMember, the grid loaded without errors ! :)
Upvotes: 0