sir,
my name is Babin raj i am a btec student ,i am also working as a freelancer i have a doubt on datagridview combobox .the problem is that when i trys to set a datasource to combobox cell dynamically the color of the combobox dropdown list changes to black color below is the code i have used
private void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
int n = dataGridView1.CurrentCell.RowIndex;
if (dataGridView1.CurrentCell.ColumnIndex == 0)
{
var cbCell = dataGridView1.Rows[n].Cells["category"] as DataGridViewComboBoxCell;
DataTable dt = c1.ret("select category from category").Tables[0];
cbCell.DataSource = dt;
cbCell.ValueMember = "category";
cbCell.DisplayMember = "category";
cbCell.FlatStyle = FlatStyle.System;
}
}
please help me i have no other source to get the answer for my question i have tryed couple of code from internet but the problem is not fixed
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Baimey RajeshRank #1,338 · 1.3K reputationPosted Sep 14, 2015, 3:03 AM EDT
Babin Raj M8 reputationPosted Sep 14, 2015, 8:43 AM EDT