Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
285
Changing the row BackColor in InitializeRow isn't working
posted

Hi,

Here's my code :

private void ugdResult_InitializeRow(object sender , InitializeRowEventArgs e)
{
    Color NewColor = decimal.Parse(e.Row.Cells["Psu_AMOUNT_PAID"].Value.ToString()) < 0 ? Color.Red : Color.FromArgb(0 , 0 , 0 , 0);
  
e.Row.Appearance.BackColor = NewColor;
}

Based on a last help I received :

Anyway, Assuming that line of code that sets the BackColor is getting executed, then something else must be overriding the row's appearance. This could be because you are using AppStylist or maybe you are setting other Appearances that cover the row - for example, the CellAppearance for the cells in that row or the RowCellAppearance

I just don't know how to solve the problem.  Any help would be appreciated.

Parents Reply Children
No Data