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.
Unfortunately, activation email could not send to your email. Please try again.

Printing a range of cells

Thread ID:

Created:

Updated:

Platform:

Replies:

1818 Nov 27,2002 12:36 PM Nov 28,2002 01:15 AM Windows Forms 1
loading
Tags: GridControl
Teodorico Morell
Asked On November 27, 2002 12:36 PM

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 01:15 AM

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.

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.

;