We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

GridGroupingControl - PrintPreview not reflecting print setup.

I have a GGC. I am trying print and as well as print preview my data being displayed in grid. The code I am using for print & print preview are given below. Print Preview: ============== //Uses the default printer. GridPrintDocument pd = new GridPrintDocument(GGC.TableControl, true); PrintPreviewDialog dlg = new PrintPreviewDialog() ; dlg.Document = pd; dlg.ShowDialog(); Print: ============= GridPrintDocument pd = new GridPrintDocument(GGC.TableControl, true); PrintDialog dlg = new PrintDialog() ; dlg.Document = pd; if( dlg.ShowDialog() == DialogResult.OK) pd.Print(); Now the problem is: I clicked on the print button(which calls Print method) and then the properties button in print dialog. I set up the print as landscape rather than portrait, And Clicked on OK. Then I clicked on print preview button(which calls PrintPreview method), the print preview was still on portrait and not on landscape as I had just set up. When I then clicked on the print button (which calls Print method) and this time printed the document. The grid was printed on landscape view rather than portrait - so the actual print worked but the print properties set up were NOT reflected in print preview. What is the problem? How should I correct my print preview? Rgds Rajani Kanth

1 Reply

AD Administrator Syncfusion Team December 5, 2005 11:47 PM UTC

I am not sure that this is related to Essential Grid. When you launch PrintPreview from the PrintDialog, it is not Essential Grid code setting up the preview. Try this sample. It just draws a rectangle on the page and has no Syncfusion code in it. Do you see the same problem with it? http://www.syncfusion.com/Support/user/uploads/GenericPrinting_a66a877f.zip

Loader.
Live Chat Icon For mobile
Up arrow icon