I have an Ultragrid which display things with backcolor depending on situation...
When I try to print, in the print preview, I got this (which is the same I got if I do print)...
So, question is simple : What should I do in order to get the same result as what I see when "consulting" the grid as normal...
well, If I remove the Alphalevel, the cell is not longer colored with the color.. (well the background is not colored as expected).
So, tell me.. in order to color a Row regarding the value of a cell, what should I do ?
What's wrong with my method ?
e.Row.Appearance.AlphaLevel = 200; e.Row.Appearance.BackColorAlpha = Infragistics.Win.Alpha.Opaque; //e.Row.Appearance.BackColorAlpha = Infragistics.Win.Alpha.Default; e.Row.Appearance.BackColor = Color.Red;
Hi,
Does the problem go away if you do not set the AlphaLevel property?
If so, then you could easily work around the issue by check e.Row.Band.Layout.IsPrintLayout and skipping that code when it's true.
If not, then there must be something else going on. Can you post a small sample project demonstrating the issue so I can check it out? If I have a sample I can run and debug, I'm sure I can tell you what's causing it.
Ok
In the screenshot "composition", First picture is the grid being used in my application... with a Style and the
color treatment...
private void EtatGrid_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e) { if(e.Row.Cells["Process"].Value.ToString() != "OK") { e.Row.Appearance.AlphaLevel = 200; e.Row.Appearance.BackColorAlpha = Infragistics.Win.Alpha.Opaque; e.Row.Appearance.BackColor = Color.Red; } }
Second image is what I get when exporting for printing... As you can see, the red lines persists but not the backcolor...
Any logical explanations ?
thanks
Hi Nicloas,
It looks like you intended to post an image with your post, but I don't see the image. To attach an image file, go to the Options tab while posting and just attach the image as a file.