Reputation: 4010
I have winform application with DataGridView
and there I am using Cascading ComboBox. For example column 1 has one ComboBox
and value of column 2 combobox depends on column 1 selection. Everything seems to be fine but when i open 2nd combobox then its backcolor gets black. See the screenshot. I am not setting backcolor anywhere (in design or code). Any idea why this strange behavior?
I am binding 2nd ComboBox in EditingControlShowing event of DataGridView
. If i bind that in FromLoad event then it works fine.
Upvotes: 4
Views: 2333
Reputation: 21
it's an old post but someone might need this like me. Why not try:
cmbBox.SelectionChangeCommitted += new EventHandler(comboBox_SelectionChangeCommitted);
instead of:
cmbBox.SelectedIndexChanged += new EventHandler(comboBox_SelectedIndexChanged);
Upvotes: 2
Reputation: 4010
In combobox DropDown
event I am setting BackColor = Color.White;
. So its a workaround I found for now. Any other solution is welcomed.
Upvotes: 2
Reputation: 81675
Check the DefaultCellStyle
of the column. It's the only place I see where I can duplicate the blackness.
Upvotes: 2