I have a datagridview on a form with an associated SelectionChanged event.
When the selected row contains "attachments" then the backcolor of the btnComments control should turn yellow as follows:
int noAttachments = 1;
if (noAttachments > 0)
btnAttachments.BackColor = Color.Yellow;
else
btnAttachments.BackColor = normalColour;
btnAttachments.Invalidate();
The code works as expected except that the Invalidate() call does nothing! i.e. the colour of the button does not change!
Any ideas why?