ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

PrintInfo.PageFooter Property

Gets or sets a string to be printed at the bottom of each page.

[Visual Basic]

Public Property PageFooter As String

[C#]

public string PageFooter {get;set;}

[Delphi]

public property PageFooter: String read get_PageFooter write set_PageFooter;

Remarks

By default, this property returns an empty string, and no page footer is printed.

If specified, the page footer can consist of up to three substrings separated by the \t character sequence. The first substring will be left-aligned, the second centered, and the third right-aligned on the printed page. The \p sequence will be replaced by the current page number during printing.

In addition, the following characters provide even greater control over the appearance of the PageFooter property, especially when the grid is so large that columns span more than one printed page.

\p

Current page number. 1-based, and incremented by subpages (that is, the group of pages that hold all of the columns for a set of records).

\P

Total number of pages; each sub-page is counted separately.

\g

Current subpage group number. 1-based.

\G

Total number of subpage groups.

\s

Current subpage number. 1-based.

\S

Total number of subpages.

Example

The following code sets the PageFooter property of the default PrintInfo object so that the word "CONFIDENTIAL" is centered at the bottom of each page:

·      Visual Basic

       Me.C1TrueDBGrid1.PrintInfo.PageFooter = Chr(Keys.Tab) + "CONFIDENTIAL"

·      C#

       this.C1TrueDBGrid1.PrintInfo.PageFooter = "\tCONFIDENTIAL";

·      Delphi

       Self.C1TrueDBGrid1.PrintInfo.PageFooter := '\tCONFIDENTIAL';

For a more detailed footer that displays the number of groups is on the left, the sub-page number in the center, and the total number of pages is on the right (preceded by the word "Page"), use the following code:

·      Visual Basic

       Me.C1TrueDBGrid1.PrintInfo.PageFooter = Chr(Keys.Tab) + "Page: \g of group \G, \s of subpage \S, \p of page \P"

·      C#

       this.c1TrueDBGrid1.PrintInfo.PageFooter = "\tPage: \g of group \G, \s of subpage \S, \p of page \P";

·      Delphi

       Self.C1TrueDBGrid1.PrintInfo.PageFooter := '\tPage: \g of group \G, \s of subpage \S, \p of page \P';

See Also

PrintInfo Class | PrintInfo Members | C1.Win.C1TrueDBGrid Namespace


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.