Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataGridViewComboBox Adding Objects
Message
De
30/11/2006 16:54:40
Jeff Corder
Ambit Technologies, LLC
Missouri, États-Unis
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
DataGridViewComboBox Adding Objects
Divers
Thread ID:
01173904
Message ID:
01173904
Vues:
61
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform