I have a checkbox column in radgridview, what do I want ? when checkbox is true then label1 turns red, when false label1 turns black.
this code snippet runs fine only when the checkbox column evaluates to true, whereas when false label1 shows no color change.
private void C_0_GridData_ValueChanged(object sender, EventArgs e)
{
if (C_0_GridData.ActiveEditor is RadCheckBoxEditor)
{
label1.ForeColor = Color.Red;
}
else { label1.ForeColor = Color.Black; }
}
How to solve it?
finally, to detect whether checkboxcolumn in radgridview is in checked position or not, this simple code works as I expected:
I put this code inside the CellValueChanged event, instead of using the ValueChanged event.