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...
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.
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,
Okay, the color is being overriden by a setting in the isl file. The isl is applying a background image to the Row with a solid white block image. I'm not sure why - it seems kind've odd, but the image is covering up the backcolor.When you alphablend, you are seeing the color through the image.
So the simplest solution would be to modify the isl and remove the image.
Open up the isl in AppStylist.
Go to the Grid canvas.
Mouse over any cell in the grid and press 2 - this will take you to the GridRow UIRole.
In the Background section, drop down the Image and select No image.
Then save the isl (you might want to save it as a copy so you don't overwrite the original) and use the new isl. Then you can set the color of a row without messing around with the alpha blending and the printing works fine.
I'm using the Nautilus style...
But would I have to do the same action for every ISL file a provide to my client ?
this isl file a right from your distribution of version 13.2.
So, do I have to "fix" on all ISL or is it only for the Nautilus style ?
It seems to be ok but for the nautilus style.
Ok thanks for your answer...
Just one last question: What property should I "play" with in order to have the printing of the grid fit a page..
My question is simple : If I change the size of the windows, the printPreview change what's on the page to be printed (the more width I have the more
pages are required to print the grid..)
Any clues ?
Thanks
I'm not sure I follow you. The size of the PrintPreview dialog has no effect on the actual printout.
If you want the grid to print on a single page (width), you can do this:
private void ultraGrid1_InitializePrint(object sender, CancelablePrintEventArgs e) { e.DefaultLogicalPageLayoutInfo.FitWidthToPages = 1; } private void ultraGrid1_InitializePrintPreview(object sender, CancelablePrintPreviewEventArgs e) { e.DefaultLogicalPageLayoutInfo.FitWidthToPages = 1; }
You actually only have to do this in one of these two events, but which one you use depends on how you are printing, so I listed them both. Doing it both probably won't hurt, anyway.
You did follow me :)
FitWidthToPages made the trick...
So glad I did find answers to my questions.
Thanks a lot Mike...
Thanks from Toulouse, France.. ;)