Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataGridView ComboBox to show different data
Message
De
05/12/2006 17:58:37
Jeff Corder
Ambit Technologies, LLC
Missouri, États-Unis
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
DataGridView ComboBox to show different data
Divers
Thread ID:
01175067
Message ID:
01175067
Vues:
115
I've tried everything I can think of. It's time to pick some better brains than mine.

I have a DataGridView which shows items on an invoice. One column is Units of Measure (Each, Box, Dozen...). The Units of Measure for each item may be different. Also, depending on the Unit of Measure, the price, cost and a few other values change. I could just put the Unit of Measure string into the combobox, but I'd be making database hits constantly to update the prices.

I tried binding a business object to each combobox (set when I look up the Inventory item), but it seems that when the Business Object went out of scope, it apparently closed the recordset and things went haywire (very haywire).

I created an object containing the data I was interested in and added the objects to the ComboBox.Items collection. I get an error that the "DataGridViewComboBoxCell value is not valid." Since I picked the value from the list, there must be something else wrong. I overload ToString() in the object and the UOM's are displaying correctly.

Any suggestions will be greatly appreciated.
Jeff Corder
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform