|
Is this a bug or am I doing something wrong?
I have a simple DataGridView with 2 columns, the second being a ComboBoxColumn. The grid is bound to a subset of a larger collection and the ComboBoxColumn is bound to the entire collection. But each row displays only the first record of the entire collection. The first column displays correctly and if I change the second column to a text column it displays OK.
This is my code: grdRecipeIngredients.DataSource = ingsSelected grdRecipeIngredients.Columns("Name").DataPropertyName = "Ref" Dim cbo As DataGridViewComboBoxColumn cbo = CType(grdRecipeIngredients.Columns("Name"), DataGridViewComboBoxColumn) cbo.DataSource = ingsAll cbo.ValueMember = "Ref" cbo.DisplayMember = "Name" |