Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataGridView ComboBox to show different data
Message
From
05/12/2006 17:58:37
Jeff Corder
Ambit Technologies, LLC
Missouri, United States
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
DataGridView ComboBox to show different data
Miscellaneous
Thread ID:
01175067
Message ID:
01175067
Views:
114
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
Next
Reply
Map
View

Click here to load this message in the networking platform