DataGridView e.CellStyle.BackColor not working

  • Thread starter Backwater Geezer
  • Start date
B

Backwater Geezer

Hi there,

Strange problem

I tried to change the back color to red.

e.CellStyle.BackColor = Color.Red;


First I put the code into CellFormatting - nothing happened.
CellPainting - the same, I mean nothing.

Going through debugger the code is being executed but the screen shows
the default color.

Just in case I deleted the grid and put it again from scratch. Did not
help. The grid is a part of a UserControl and is not public so nothing
from 'outside' can mess it up.

On other hand the above code works fine in a different application.

Any ideas?

MH
 
B

Backwater Geezer

OK, forget.
I tested on a single line grid where the selection was set to row.

MH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top