Home Forums WinForms controls Xceed Grid for WinForms vertical columns when printing from grid? Reply To: vertical columns when printing from grid?

User (Old forums)
Member
Post count: 23064

Have been using the Reporting object to print so far and it’s done the job fine (excluding the vertical columns).

Your reply prompted me to try a different way of printing. So using the .Print() method directly off of the grid, or using a GridPrintDocument object (again with .Print()) actually causes an exception in both areas where I use a grid to print.

The last part of the stack trace can be seen below, is there anything obvious in the way I am using the grid that might cause this to occur? Using the Reporting class to print has never caused me a problem.

————————————————————-
System.ArgumentException was unhandled
Message=”Parameter is not valid.”
Source=”System.Drawing”
StackTrace:
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, Graphics g)
at Xceed.UI.Adaptive.VisualStyleRenderedTheme.PaintRowHeaderPane(Graphics graphics, Rectangle rectangle, Color foreColor, Color backColor, Image backgroundImage, ContentAlignment backgroundImageAlignment, ImageStyle backgroundImageStyle, Double opacity)
at Xceed.UI.Adaptive.VisualStyleRenderedTheme.PaintRowHeaderPane(Graphics graphics, Rectangle rectangle, Color foreColor, Color backColor, Double opacity)
at Xceed.UI.Adaptive.AdaptiveTheme.PaintRowHeaderPane(Graphics graphics, Rectangle rectangle, Color foreColor, Color backColor, Double opacity)
at Xceed.Grid.RowSelectorPane.PaintBackground(GridPaintEventArgs e)
at Xceed.Grid.PrintManager.PrintRowSelectorPane(Graphics graphics)
at Xceed.Grid.GridPrintDocument.PrintPageRectangle(Graphics graphics, Rectangle pageRectangle, Rectangle bodyRectangle, Row firstPrintingRow)
at Xceed.Grid.GridPrintDocument.OnPrintPage(PrintPageEventArgs e)
at System.Drawing.Printing.PrintDocument._OnPrintPage(PrintPageEventArgs e)
at System.Drawing.Printing.PrintController.PrintLoop(PrintDocument document)
at System.Drawing.Printing.PrintController.Print(PrintDocument document)
at System.Drawing.Printing.PrintDocument.Print()

Imported from legacy forums. Posted by matt (had 315 views)