Back to Devexpress

How to: Insert Page Numbers in Header or Footer

windowsforms-8307-controls-and-libraries-rich-text-editor-examples-layout-how-to-insert-page-numbers-in-header-or-footer.md

latest937 B
Original Source

How to: Insert Page Numbers in Header or Footer

  • Apr 01, 2018

While editing the document’s header or footer, you can insert fields specifying the current page number, or the total number of pages in a document. To accomplish this, use the corresponding command bar buttons, as illustrated in the picture below:

Another method is to insert the field manually, using the following steps:

  1. Enter the header/footer editing mode. For this, double click in the existing header or footer, or use the command button to insert a new one.
  2. Press the CTRL+F9 key combination to insert a field. A pair of braces appears, indicating the code range of the field. Type in ‘ page ‘ to denote a page number or a ‘ numpages ‘, for the total number of pages in the document.
  3. Right-click the field and select ‘ Update Field ‘ command in the context menu.