The DataGridViewComboBoxColumn works fine in my application. It shows the data bound to the data grid view and the combo box contains the correct list of items. The problem is that the edit box (value) is separate from the combo box - two cells side by side. It looks like two separate columns. If I select an item in the combo box, the value does not change. I have to manually type the selection into the value edit box in order for the selection to become the cell value. I am setting the combo box manually by setting the items. What might I be missing. I expect the combo and value to display in the same cell.
{// executed onceBindingSource bindingSource = new BindingSource();
DataTable myTbl = new DataTable();
bindingSource.DataSource = myTbl;
column = new DataGridViewComboBoxColumn();
dataGridView3.DataSource = bindingSource;
}
// executed when user selects something elsewhere
dataGridView3.Columns.Insert(0, column);
FillUsersComboNotInRole(args)
m_roleUsersSqlCommand.CommandText = string.Format("SELECT Username FROM {0}",
roleName);
m_roleUsersBuilder.RefreshSchema();m_roleUsersDataAdapter.Fill(((DataTable)((BindingSource)dataGridView3.DataSource).DataSource));