开发者

EF4 to datagrid with a combo box as a column in winforms

开发者 https://www.devze.com 2023-01-22 01:19 出处:网络
I have a list of entities and I need to bind it to a datagrid. One of the properties in the list is a collection and I need to bind that to a combo box within a datagrid. I am new to Win开发者_开发百科

I have a list of entities and I need to bind it to a datagrid. One of the properties in the list is a collection and I need to bind that to a combo box within a datagrid. I am new to Win开发者_开发百科dows Forms.

var list = (from p in db.persons
               select new person{p.firstname,p.lastname,p.phonenumbers}).tolist()

I need phone numbers bound to a combo box column which is like a preferred phone number for the person. A person can change their phone number from their list of provided phone numbers.

How can I track this change in ef4?

please guide me with any articles or examples.


Please see the sample code with ComboBox in the DataGrid here: http://www.gotdotnet.ru/files/download/109/

0

精彩评论

暂无评论...
验证码 换一张
取 消