Question

private void CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
  if(whatever)
    e.CellStyle.BackColor = SystemColors.ControlDark;

This works fine for text columns but for combo box columns it makes no difference. I'd just as soon not make an owner draw control if there's a simpler way to do this.

Thanks, Spike

Was it helpful?

Solution

I've searched my programs layout manager code looking for everything that is connected to DGV combobox columns and only BackColor and SelectionBackColor are set. If it changes anything we have style set to flat and this is working well(col.FlatStyle = FlatStyle.Flat).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top