Hi I have a datagridview which has one binding source .. One of 开发者_如何转开发the column is foreign key from another table that has text value ( like country for example ) .. i want to display the cells in this column as combo box filled with the country names from another table ..
Summary : I need to fill the datagridview with one binding source, and a column of it with another binding source as combo box .
Thanx in advance
Yes, that is the way you do it.
Just bind the combobox column's datasource to the other table. Set the display member as the column (eg Name) and set the value member to the PK column. In the DataGridView set the data member of that column to the FK id.
Works pretty easy. I use it all the time.
精彩评论