Okay, I'm successfully changing the backcolor of cells in my grid based on the data being populated.
What I want to do now is when a button is clicked, check to see if any of the cells still have a red background.
However, I cannot seem to get any property that will tell me if the cell has a background color of Color.Red.
Here is the code I've been trying:
What I want to do now is when a button is clicked, check to see if any of the cells still have a red background.
However, I cannot seem to get any property that will tell me if the cell has a background color of Color.Red.
Here is the code I've been trying:
for (int iRow = 0; iRow < ProductsRadGridView.Rows.Count; iRow++)
{
for (int iCell = 2; iCell < 6; iCell++)
{
if (ProductsRadGridView.Rows[iRow].Cells[iCell].Style.BackColor == Color.Red)
{
}
//valid = false;
//MessageBox.Show("One or more Line Item Values needs modification. Please make the necessary change.);
//return valid;
}
}
However, the Style.BackColor returns some ambigous name called "ControlDarkDark". This is the value regardless of the back color.
How can I check what the back color really is?
Lee