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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Printing a range of cells

Thread ID:

Created:

Updated:

Platform:

Replies:

1818 Nov 27,2002 05:36 PM UTC Nov 28,2002 06:15 AM UTC WinForms 1
loading
Tags: GridControl
Teodorico Morell
Asked On November 27, 2002 05:36 PM UTC

How can I print a range of cells? I can not find the properties in GridPrintDocument or grid.Properties.Printxxx. Thanks.

Administrator [Syncfusion]
Replied On November 28, 2002 06:15 AM UTC

Some sample code: GridPrintDocument pd = new GridPrintDocument(grid); //Assumes the default printer if (PrinterSettings.storedPageSettings != null) { pd.DefaultPageSettings = PrinterSettings.storedPageSettings } PrintDialog dlg = new PrintDialog() ; dlg.Document = pd; dlg.AllowSelection = true; dlg.AllowSomePages = true; DialogResult result = dlg.ShowDialog(); if (result == DialogResult.OK) { pd.Print(); } Use the following code for print preview GridControlBase grid = ActiveGrid; GridPrintDocument pd = new GridPrintDocument(grid, true); //Assumes the default printer if (PrinterSettings.storedPageSettings != null) { pd.DefaultPageSettings = PrinterSettings.storedPageSettings; } PrintPreviewDialog dlg = new PrintPreviewDialog() ; dlg.Document = pd; dlg.ShowDialog(); Stefan

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;