List<columns> columns = DataLoader.GetColumns();
List<tables> tables = DataLoader.GetTables();
editingDataGridView.DataSource = columns; // my dataGridView
DataGridViewComboBoxColumn comboBoxColumn = new DataGridViewComboBoxColumn(); //my combobox column
comboBoxColumn.DisplayMember = "Table_Name";
comboBoxColumn.ValueMember = "Table_ID";
comboBoxColumn.DataSource = tables;
//add combobox column in dataGrid
this.editingDataGridView.Columns.Add(comboBoxColumn);
int index = this.editingDataGridView.Columns.IndexOf(comboBoxColumn);
//AND this i want set value
for (int i = 0; i < columns.Count; i++)
{
//do not work; not set value from columns
this.editingDataGridView.Rows[i].Cells[index].Value = columns[i].Table_ID;
}
int index = this.editingDataGridView.Columns.IndexOf(comboBoxColumn);
int index = comboBoxColumn.Index;
(this.editingDataGridView.Rows[i].Cells[index] as DataGridViewComboBoxCell).Value = tables.FirstOrDefault(c =>c.Table_ID == columns[i].Table_ID);