Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataGridViewComboBox Adding Objects
Message
From
30/11/2006 16:54:40
Jeff Corder
Ambit Technologies, LLC
Missouri, United States
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
DataGridViewComboBox Adding Objects
Miscellaneous
Thread ID:
01173904
Message ID:
01173904
Views:
60
I am using the mmDataGridView to show items ordered. I have a Unit of Measure column (each, dozen, box...) where the user selects the UOM and based on that I change prices and other data. The options may vary for each row, so I can't just bind the column. In attempting to be bold, I add business entities to the DataGridViewComboBoxCell instead of just a string containing the unit.

Ent.SetDataRow(dr);
UOMCell.Items.Add(Ent);

To display and retrieve the data, I also set:

((DataGridViewComboBoxColumn)(this.dgvItems.Columns["colUOM"])).DisplayMember = "UOMName";
((DataGridViewComboBoxColumn)(this.dgvItems.Columns["colUOM"])).ValueMember = "Self";

Where Self returns the busines object entity.

On the first row, all goes well. After that, the grid doesn't redraw completely. Cells only update when they are selected and on the last row even the cells only display when moving through the cells (the row starts off with only one cell displayed). After entering several rows, the vertical lines between the cells no longer align.

I have been unable to find anything referencing a problem like this. Any help would be greatly appreciated.

Jeff Corder
Next
Reply
Map
View

Click here to load this message in the networking platform