Spread for ASP.NET 10 Product Documentation
PrintSheet Event
Example 


Occurs when a sheet is printed.
Syntax
'Declaration
 
Public Event PrintSheet As PrintEventHandler
'Usage
 
Dim instance As FpSpread
Dim handler As PrintEventHandler
 
AddHandler instance.PrintSheet, handler
public event PrintEventHandler PrintSheet
Event Data

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

PropertyDescription
ContentGets or sets the HTML content for the header or the footer of the sheet. For the header, the default is the sheet name. For the footer, the default is an empty string.  
HeaderGets whether to print the sheet header.  
PageBreakGets or sets whether to include a page break.  
RowGets the row index.  
SheetIndexGets the index of the sheet to print.  
SkipGets or sets whether to skip printing this sheet.  
Remarks
This event fires for each row.
Example
This example prints a header and a footer.
private void FpSpread1_PrintSheet(object sender, FarPoint.Web.Spread.PrintEventArgs e)
        { 
            if (e.Header == true)
            {
                e.Content = "Header";
            }
            if (e.Header == false)
            {
                e.Content = "Footer";
            }
        }
Private Sub FpSpread1_PrintSheet(ByVal sender As Object, ByVal e As FarPoint.Web.Spread.PrintEventArgs) Handles FpSpread1.PrintSheet
        If e.Header = True Then
            e.Content = "Header"
        End If 
        If e.Header = False Then
            e.Content = "Footer"
        End If
    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.