Information générale
Catégorie:
The Mere Mortals .NET Framework
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement