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

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #15424 |

    I’m looking at printing columns on a grid vertically.

    The number of columns and the size of text in each of those columns, coupled with the fact that all cells in the grid structure below will contain small integer values (hence all cells will have little width) make vertical columns on print a best solution.

    I’ve implemented vertical columns on the grid itself, with reference to an existing solution elsewhere in the forum which works really well.

    Does anyone know of a place i may be able to hook into to achieve this? Right now I’m investigating where this might be done.

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

    User (Old forums)
    Member
    Post count: 23064

    Do you use the Reporting feature of the grid, or are you simply using the Print method of the GridControl?

    Imported from legacy forums. Posted by André (had 211 views)

    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)

    User (Old forums)
    Member
    Post count: 23064

    Can you send a sample application to <a href=”mailto:support@xceedsoft.com”>support</a> reproducing the exception?

    Imported from legacy forums. Posted by André (had 341 views)

    User (Old forums)
    Member
    Post count: 23064

    Figured out what was causing the problem – changing some properties of RowSelectorPane (Visible, Width) seems to do the trick.

    I’ve got printing with vertical headers + custom graphics (header, etc) now. Lost the ability to use report templates but this is a much better way of doing things.

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

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.