I know you can use the BindingSource object with a DataGridView.
Is it possible to have a combo box in one of the columns and still take advantage of the BindingSource?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, it is – take a look at ComboBox with DataGridView in C#:
Essentially what the article describes is binding the comboboxes with a separate binding source – in this case, a validation table, where
MonthIDandMonthNameare stored, and the month name is displayed based on the id from the original data.Here he sets up the Month data source, selecting from a month table, and then creates a
BindingSourcefrom the returned data.Then he adds the month ComboBoxColumn to the DataGridView, using the
DataSourceas theBindingSourcecreated above:And then finally, he binds the
DataGridViewto the original data.