When i try to change Row color after checkbox checked my Row color changed only after i chaned another Row checkbox for example if i checked Row the color not changed and only after checked another Row the first Row color changed and same thing when unchecked.
Please see my code:
private void radGridView1_RowFormatting(object sender, RowFormattingEventArgs e)
{
if ((bool)e.RowElement.RowInfo.Cells["Select"].Value == true)
{
e.RowElement.DrawFill = true;
e.RowElement.GradientStyle = GradientStyles.Solid;
e.RowElement.BackColor = Color.SkyBlue;
}
else
{
e.RowElement.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local);
e.RowElement.ResetValue(LightVisualElement.GradientStyleProperty, ValueResetFlags.Local);
e.RowElement.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local);
}
}
Please see my code:
private void radGridView1_RowFormatting(object sender, RowFormattingEventArgs e)
{
if ((bool)e.RowElement.RowInfo.Cells["Select"].Value == true)
{
e.RowElement.DrawFill = true;
e.RowElement.GradientStyle = GradientStyles.Solid;
e.RowElement.BackColor = Color.SkyBlue;
}
else
{
e.RowElement.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local);
e.RowElement.ResetValue(LightVisualElement.GradientStyleProperty, ValueResetFlags.Local);
e.RowElement.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local);
}
}