Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo Box in DataGridView
Message
De
14/06/2006 09:44:21
Jeff Corder
Ambit Technologies, LLC
Missouri, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01127500
Message ID:
01128988
Vues:
23
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform