Skip to content

Replies

0
Marc Roussel
Marc Roussel answered on Jan 16, 2017 3:08 PM

Ok I found why.  It was the isl in the project that was COPY ALWAYS which wasn't the one I modified.  I was modifying the one in RELEASE and it was overrided.

Thank you

0
Marc Roussel
Marc Roussel answered on Jan 16, 2017 2:57 PM

I looked at the C# code and there's nothing inside the code that changes a layout or anything about the row background nor the isl file

0
Marc Roussel
Marc Roussel answered on Jan 16, 2017 2:39 PM

Hi,

Of course if it works for you and I have some kind of setting that override even if I do a sample it'll certainly work because I will not bring the faulty setting.  The question is how do I go about finding what kind of setting could possibly override ?

0
Marc Roussel
Marc Roussel answered on Jan 13, 2017 5:59 PM

My last attempt 😉

Color NewColor = IsNegative ? Color.Red : Color.FromArgb(0 , 0 , 0 , 0);

e.Row.Appearance.BackGradientStyle = Infragistics.Win.GradientStyle.None;
e.Row.Appearance.BackHatchStyle = BackHatchStyle.None;
e.Row.CellAppearance.BackGradientStyle = GradientStyle.None;
e.Row.CellAppearance.BackHatchStyle = BackHatchStyle.None;

e.Row.Appearance.BackColor = NewColor;
e.Row.Appearance.BackColor2 = NewColor;
e.Row.CellAppearance.BackColor = NewColor;
e.Row.CellAppearance.BackColor2 = NewColor;

if(IsNegative)
    e.Row.Appearance.ForeColor = Color.White;

0
Marc Roussel
Marc Roussel answered on Jan 13, 2017 5:55 PM

I tried this but no luck

Color NewColor = IsNegative ? Color.Red : Color.FromArgb(0 , 0 , 0 , 0);
//e.Row.Appearance.BackGradientStyle = Infragistics.Win.GradientStyle.None;
//e.Row.Appearance.BackHatchStyle = BackHatchStyle.None;
//e.Row.CellAppearance.BackGradientStyle = GradientStyle.None;
//e.Row.CellAppearance.BackHatchStyle = BackHatchStyle.None;
e.Row.Appearance.BackColor = NewColor;
e.Row.Appearance.BackColor2 = NewColor;
if(IsNegative)
    e.Row.Appearance.ForeColor = Color.White;
0
Marc Roussel
Marc Roussel answered on Jan 13, 2017 5:53 PM

Here's my new code :

bool IsNegative = decimal.Parse(e.Row.Cells["Psu_AMOUNT_PAID"].Value.ToString()) < 0; Color NewColor = IsNegative ? Color.Red : Color.FromArgb(0 , 0 , 0 , 0);
e.Row.Appearance.BackGradientStyle = Infragistics.Win.GradientStyle.None;
e.Row.Appearance.BackHatchStyle = BackHatchStyle.None;
e.Row.CellAppearance.BackGradientStyle = GradientStyle.None;
e.Row.CellAppearance.BackHatchStyle = BackHatchStyle.None;
e.Row.Appearance.BackColor = NewColor;
e.Row.Appearance.BackColor2 = NewColor;
if(IsNegative)
    e.Row.Appearance.ForeColor = Color.White;

All this still doesn't change the background

0
Marc Roussel
Marc Roussel answered on Jan 13, 2017 5:48 PM

One small thing.

Idid remove the background image, saved the style and now I have the following code

bool IsNegative = decimal.Parse(e.Row.Cells["Psu_AMOUNT_PAID"].Value.ToString()) < 0;
Color NewColor = IsNegative ? Color.Red : Color.FromArgb(0 , 0 , 0 , 0);
e.Row.Appearance.BackGradientStyle = Infragistics.Win.GradientStyle.None;
e.Row.Appearance.BackColor = NewColor;
if(IsNegative)
    e.Row.Appearance.ForeColor = Color.White;
At least now I see the ForeColor changed to white but the BackColor doesn't change and it looks like the Grandient is still active
At first I saw you were saying e.Row.CellAppearance.BackGrandientStyle but it wasn't working anyway so I changed it for e.Row.Appearance.BackGradientStyle and still not working.  As if the BackGradientStyle can't be changed in this event am I right ?