This is SqlDataAdapter
that I use for filling dataGridView1
but before I fill it I add DataGridViewComboBoxColumn
to that datagridview So
Your DataGridViewColumn
must be added to DataGridView
before you set .DataSource
.
Then set .DataPropertyName
for new column:
cbColumn.DataPropertyName = "PLODINA"
DataPropertyName
must be name of the field from "PRONAJEM" table.
And then item of comboboxcolumn where .ValueMember = PRONAJEM.PLODINA(from DataTable)
will be selected