Spread for ASP.NET 10 Product Documentation
PrintBackground Event
Example 


Occurs before each page is printed.
Syntax
'Declaration
 
Public Event PrintBackground As PrintBackgroundEventHandler
'Usage
 
Dim instance As FpSpread
Dim handler As PrintBackgroundEventHandler
 
AddHandler instance.PrintBackground, handler
public event PrintBackgroundEventHandler PrintBackground
Event Data

The event handler receives an argument of type PrintBackgroundEventArgs containing data related to this event. The following PrintBackgroundEventArgs properties provide information specific to this event.

PropertyDescription
GraphicsGets or sets the graphics device that does the printing.  
PageNumberGets or sets the current page being printed.  
SheetRectangleGets or sets the rectangle area representing the sheet.  
Example
This example uses the PrintBackground event.
protected void FpSpread1_PrintBackground(object sender, FarPoint.Web.Spread.PrintBackgroundEventArgs e)
        {
            ListBox1.Items.Add(e.PageNumber.ToString());
        }
Protected Sub FpSpread1_PrintBackground(sender As Object, e As FarPoint.Web.Spread.PrintBackgroundEventArgs) Handles FpSpread1.PrintBackground
      ListBox1.Items.Add(e.PageNumber.ToString())
End Sub
Requirements

Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

FpSpread Class
FpSpread Members

 

 


Copyright © GrapeCity, inc. All rights reserved.