FlexGrid for WinForms
Header Property
Example 



Gets or sets a string that contains the page headers.
Syntax
'Declaration
 
<DefaultValueAttribute()>
Public Property Header As String
'Usage
 
Dim instance As GridPrinter
Dim value As String
 
instance.Header = value
 
value = instance.Header
[DefaultValue()]
public string Header {get; set;}
[DefaultValue()]
public:
property String^ Header {
   String^ get();
   void set (    String^ value);
}
Remarks

The string may be divided by tab characters into up to three sections. The sections are then left, center, and right-aligned at the top of each page.

The string may contain placeholders "{0}" and "{1}" which are replaced with the current page number and total page count.

Use the HeaderFont property to select the font used to render the header.

Example
The code below specifies a right-aligned header with a "Page n of m" display using a 10-point Tahoma font.
_flex.Header = "\t\tPage {0} of {1}";
_flex.HeaderFont = new Font("Tahoma", 10);
_flex.PrintGrid("Header");
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

GridPrinter Class
GridPrinter Members

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Send Feedback