Home - Forums-.NET - FlyGrid.Net (Windows Forms) - Printing doesn't work

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

Printing doesn't work
Link Posted: 05-Jun-2006 07:01
            this.Stylist = new GridPrintStylist();
            PrintSettings ps = new PrintSettings();
            ps.PrinterSettings = new System.Drawing.Printing.PrinterSettings();  
            ps.PrinterSettings.PrintRange = System.Drawing.Printing.PrintRange.AllPages;
            ps.PageSettings.Landscape = true;
            ps.Options |= PrintOptions.ShowMarginsInPreview;
            ps.Options |= PrintOptions.ShowPrintDialog;
            ps.Options |= PrintOptions.ShowPreviewDialog;
            ps.Options |= PrintOptions.FitToPageWidth;
            //ps.Options |= PrintOptions.FitToPage;
            ps.DocumentName = \"NCompass Printout\";
            ps.Header = \"Current Date: \" + PrintSettings.ShortDateMacro +
          \"\\tDocument:\" + PrintSettings.DocumentNameMacro +
          \"\\tCurrent Time:\" + PrintSettings.ShortTimeMacro;
            ps.Footer = \"\\tPage [\" + PrintSettings.PageNumberMacro + \"] of [\" +
         PrintSettings.PageCountMacro + \"]\\t\";  
  
            this.ActivePort.PrintGrid(ps);
            this.Stylist = new GridStylist();


Did you try in landscape mode? ps.PageSettings.Landscape = true;
Link Posted: 05-Jun-2006 07:22
Hm, problem is found - Landscape orientation.
Thanks for the sample we'll try to fix this problem today.
Link Posted: 05-Jun-2006 12:54
Please download latest FlyGrid.Net update. This update contains fixes of this problem.
Link Posted: 05-Jun-2006 20:44
thx, now it works correctly