Spread for ASP.NET 12 Product Documentation
Printing a Spreadsheet
Spread for ASP.NET 12 Product Documentation > Developer's Guide > Customizing User Interaction > Managing Printing > Printing a Spreadsheet

You can print the data area of a spreadsheet by clicking Print (or the Print icon) in the command bar of the component. The appearance of the print button depends on the setting in the command bar and the type of buttons. For more information refer to Customizing the Command Buttons.

At run time, when you click Print, the standard print dialog for your machine appears and you can choose various printer settings before clicking OK to print. You can specify page breaks with the column PageBreak property or the row PageBreak property when printing to the client.

In addition to the print button, there is an IsPrint property. Setting this to true brings up a preview of what is to be printed.

The ShowColumnHeader and ShowRowHeader properties in the PrintInfo class apply when printing or saving to PDF.

You can also use the client-side Print method. For more information, refer to the Client-Side Scripting Reference.

Using Code

You can set the FpSpread component IsPrint property in code.

Example

The following code sets the IsPrint property.

C#
Copy Code
FpSpread1.IsPrint = true; 
VB
Copy Code
FpSpread1.IsPrint = True 

Using the Spread Designer

  1. Select the File menu.
  2. Select Print, SaveToPDF, or Print Preview from the Print menu.
  3. Click Apply and Exit to close the Spread Designer.