DataGridView Cascading ComboBox displays black backcolor in second combobox

I have a winform application with a DataGridView and I am using Cascading ComboBox. For example, column 1 has one ComboBox , and the column value of column 2 depends on the choice of column 1. Everything seems to be in order, but when I open the 2nd combo box, then its reverse blackness turns black. See screenshot. I do not install backcolor anywhere (in design or code). Any idea why this is weird behavior? sceenshot

I am binding a second ComboBox in the EditingControlShowing DataGridView event. If I bind this in the FromLoad event, then it works fine.

+4
source share
3 answers

In the combobox DropDown field, I set BackColor = Color.White; . So this is the workaround I found now. Any other solutions are welcome.

+1
source

Check the DefaultCellStyle column. This is the only place where I see where I can duplicate blackness.

+2
source

this is an old post, but someone might need this like me:

why not try; cmbBox.SelectionChangeCommitted + = new EventHandler (comboBox_SelectionChangeCommitted);

despite; cmbBox.SelectedIndexChanged + = new EventHandler (comboBox_SelectedIndexChanged);

+1
source

Source: https://habr.com/ru/post/1381902/


All Articles