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...
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.. ;)
Hi,
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.
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 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 ?
thanks
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.