I have different kinds of cells in a single DataGridView column.
When the user clicks on the box it used to turn entirely black.
Now I am able to capture the Entered event from the EditingControlShowing event and set the backgroundColor to white.
private void ATextBoxHasBeenEntered(object sender, EventArgs e)
{
((TextBox)sender).BackColor = Color.White;
((TextBox)sender).TextAlign = HorizontalAlignment.Left;
((TextBox)sender).BorderStyle = System.Windows.Forms.BorderStyle.None;
}
But I still see this black box!
So I went crazy trying to grab every related object and setting it to white. I've tried setting the associated DataGridViewTextBox's background to white, removing the border from everything, etc.
Nothing works :(
I can't tell if this black box is the DataGridViewTextBox or the editing control. I can't tell what event changes the color either.
What can I do?