views:

17

answers:

1

I am using entity framework 4 and Csharp. I have a datagridview in a windows form. The datagridview has a colomn with a combobox. The combobox is to hold an Entity object.

Usually I do the following:

dataGridViewComboboxColumn.DisplayMember = "DisplayThis" dataGridViewComboboxColumn.ValueMember = "DisplayThisId"

But I want:

dataGridViewComboboxColumn.ValueMember = Entity

Thanks!

A: 

I figured it out...I needed to add foreign key properties to my entity in the model.edmx.

jayblaze2

related questions