Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo Box in DataGridView
Message
From
14/06/2006 09:44:21
Jeff Corder
Ambit Technologies, LLC
Missouri, United States
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01127500
Message ID:
01128988
Views:
21
I placed the data in an MM object (oWorkStations) and set the datagridview ColumnType to DataGridViewComboBoxColumn. Since I can't change the DataSource in the EditColumns form, I used the following code:

DataGridViewComboBoxColumn dgvcc =
(DataGridViewComboBoxColumn)dgvParents.Columns["colParentFK"];
dgvcc.DataSource = "WorkStations";
dgvcc.ValueMember = "WorkStationPK";
dgvcc.DisplayMember = "ComputerName";

When the program runs, I get an error when setting the DataSource:
Complex DataBinding accepts as a data source either an IList or an IListSource.

I changed the line to

dgvcc.DataSource = oWorkStation;

with the same results.

I looked and didn't find an mmDataGridViewComboBoxColumn, so I'm at a loss as to where to go next.

Thanks for the help,
Jeff
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform