Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Grid View
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Collapse]Rich Text Editor
   [Expand]Product Information
   [Collapse]Concepts
     ASPxRichEdit Control
    [Collapse]Document
     [Collapse]Document Model
       Sub-Document
       Text Content (Text Buffer)
       Characters
       Paragraphs
       Inline Pictures
       Hyperlinks and Bookmarks
       Tables
       Sections
       Headers and Footers
       Document Fields
       Floating Objects
       Document Protection
      Document Layout
     Supported Document Formats
     Import and Export
     Formatting Characters
     Formatting Paragraphs
    [Expand]Fields
     Mail Merge
     Restrictions
     Spell Checking
    [Expand]Client API
    [Expand]Built-in Dialogs
     HTML Tag Interpretation
     Keyboard Shortcuts
   [Expand]Examples
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Expand]Site Navigation and Layout
  [Expand]File Management
  [Expand]Multi-Use Site Controls
  [Expand]Scheduler
  [Expand]HTML Editor
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gauges
  [Expand]Data Editors
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Headers and Footers

Expanded Overview

Each section in the document can have its own set of headers and footers. If no headers or footers are defined for a given section, the headers and footers from the previous section (if any) are used. The header (or footer) can be different for odd pages, even pages or the first page.

Expanded Client API

The following client commands are available for manipulating headers/footers programmatically. Call the commands in the notation given below:
clientRichEditName.commands.commandName.execute(parameter_if_any)

Command Name Link Description
closeHeaderFooter RichEditCommands.closeHeaderFooter Gets a command to substitute a header/footer sub-document with the main sub-document as an active sub-document.
goToFooter RichEditCommands.goToFooter Gets a command to substitute a header sub-document with a footer sub-document of the same page as an active sub-document.
goToHeader RichEditCommands.goToHeader Gets a command to substitute a footer sub-document with a header sub-document of the same page as an active sub-document.
goToNextHeaderFooter RichEditCommands.goToNextHeaderFooter Gets a command to substitute a current header/footer with a header/footer of the next section as an active sub-document.
goToPreviousHeaderFooter RichEditCommands.goToPreviousHeaderFooter Gets a command to substitute a current header/footer with a header/footer of the previous section as an active sub-document.
insertFooter RichEditCommands.insertFooter Gets a command to create a footer sub-document (if it is not yet created) and set it as an active sub-document instead of the main sub-document.
insertHeader RichEditCommands.insertHeader Gets a command to create a header sub-document (if it is not yet created) and set it as an active sub-document instead of the main sub-document.
linkHeaderFooterToPrevious RichEditCommands.linkHeaderFooterToPrevious Gets a command to link a header/footer to the previous section, so it has the same content.
setDifferentFirstPageHeaderFooter RichEditCommands.setDifferentFirstPageHeaderFooter Gets a command to enable (or disable if it is enabled) a different page header and footer for the first page of the current section.
setDifferentOddAndEvenPagesHeaderFooter RichEditCommands.setDifferentOddAndEvenPagesHeaderFooter Gets a command to enable (or disable if it is enabled) a different page header and footer for odd and even pages of the current section.

Expanded Manipulation Through UI

To enter a header (footer) editing mode, use the Header (or Footer) ribbon command located in the ribbon's Insert tab, in the Header & Footer group.

To switch display modes, use the Different First Page and Different Odd & Even Pages ribbon commands (in the Header & Footer context ribbon tab in the Options group).

To insert fields displaying a current page number or the total number of pages, use the Page Number and the Page Count ribbon commands (located in the ribbon's Insert tab in the Header & Footer group). You can also insert required field codes manually.

How would you rate this topic?​​​​​​​