This annoying bug was haunting me for quite a while. Luckily Nick Olsen figured it out
http://nickstips.wordpress.com/2010/12/20/c-datagridviewcomboboxcolumn-drop-down-menu-appears-all-black/
Code to fix
01 |
private void dataGridViewGLEntries_EditingControlShowing( object sender, DataGridViewEditingControlShowingEventArgs e) |
03 |
ComboBox cmbBx = e.Control as ComboBox; |
07 |
cmbBx.SelectedIndexChanged -= ComboBoxCell_SelectedIndexChanged; |
08 |
cmbBx.SelectedIndexChanged += ComboBoxCell_SelectedIndexChanged; |
10 |
// Fix the black background on the drop down menu |
11 |
e.CellStyle.BackColor = this .dataGridViewGLEntries.DefaultCellStyle.BackColor; |
Like this:
Like Loading...
Related