I am using entity framework and binding to a datagrid to display the results of my query. Instead of showing the foreign key from the result, I would like to 开发者_开发技巧show the more meaningful value from the lookup table and limit the users input by using a combobox too.
Is it possible to use a combobox in a programmatically bound datagrid on a winform? If so - how?
Thanks in advance,
James
There is a column type for a combobox in a DataGridView: http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcomboboxcolumn.aspx
For changing the display value you can use this event: http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.cellformatting.aspx
精彩评论