Reputation: 5469
I have dataGridView
with many columns and rows.
Now I'd like to bind content of first column
(text) to content of comboBox
.
How can I do this?
Upvotes: 1
Views: 1115
Reputation: 28548
You can set the datasource of combobox like this:
private void BindComboBox()
{
comboBox1.DataSource = dataGridView.DataSource;
comboBox1.DisplayMember = "The column Name you want to bind";
}
Upvotes: 3