[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Expand]Chart Control
  [Expand]Pivot Grid
  [Collapse]Rich Text Editor
   [Expand]Product Information
    Getting Started
     ASPxRichEdit Control
     [Collapse]Document Model
       Text Content (Text Buffer)
       Inline Pictures
       Hyperlinks and Bookmarks
       Headers and Footers
       Document Fields
       Floating Objects
       Document Protection
      Document Layout
     Supported Document Formats and Printing
     Import and Export
     Formatting Characters
     Formatting Paragraphs
     Mail Merge
     Table of Contents
     Spell Checking
    [Expand]Client API
    [Expand]Built-in Dialogs
     HTML Tag Interpretation
     Keyboard Shortcuts
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [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]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation


Expanded Overview

Within a document, there is often a need for groupings of content on a basis larger than a paragraph (for example, ensuring that a specific set of paragraphs and tables are printed in a landscape view, while ensuring that the remainder of the document is printed in a portrait view). In order to group this content, a document can be divided into multiple sections, each of which defines a region of content in the document and allows the application of a set of section-level properties.

Expanded Definition

A document contains at least one section. A section is a sequence of contiguous paragraphs within a sub-document's text buffer. To delimit document sections, the end of a section is marked by a specific section break (or by the final paragraph's end mark at the end of the document). The boundaries of sections mark locations where the layout rules for a document (the page size and orientation, the size of columns, text of headers and footers, the availability and display of page numbers, etc.) are changed.

A section is a logical unit that contains settings specific for its different elements and that defines to which text buffer interval these settings should be applied. Programmatically, a section is implemented as the Section client object. A list of section objects in the document can be accessed through the sectionsInfo client property (RichEditDocument.sectionsInfo) in the following notation:

A section defines the following settings.

  • Start position (Section.start)
    A position in a sub-document text buffer where the section's first paragraph starts.

  • Length (Section.length)
    The number of characters in a section within the text buffer.

  • Element properties

    • Page properties
      Page-specific formatting settings such as the page size and orientation.

    • Column properties (SectionColumn)
      Column-specific formatting settings such as the column size.

    • Header/footer properties (Section.headers, Section.headers)
      Formatting settings specific to headers or footers.

Expanded Client API

The following client commands are available for manipulating sections and their settings. Call the commands in the notation given below:

Command Name Link Description
changePageMargins RichEditCommands.changePageMargins Gets a command to apply page margins settings to sections located within a selected range.
changePageOrientation RichEditCommands.changePageOrientation Gets a command to apply page orientation settings to sections located within a selected range.
changePageSize RichEditCommands.changePageSize Gets a command to apply page size settings to sections located within a selected range.
changeSectionColumns RichEditCommands.changeSectionColumns Gets a command to apply column layout settings to a section.
changeSectionEqualColumnCount RichEditCommands.changeSectionEqualColumnCount Gets a command to change the number of columns having the same width in a section.
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.
openPageMarginsDialog RichEditCommands.openPageMarginsDialog Gets a command to invoke the Margins tab of the Page Setup dialog window.
openPagePaperSizeDialog RichEditCommands.openPagePaperSizeDialog Gets a command to invoke the Paper tab of the Page Setup dialog window.
openSectionColumnsDialog RichEditCommands.openSectionColumnsDialog Gets a command to invoke the Columns dialog window.
setPageSizeDialog RichEditCommands.setPageSizeDialog Gets a command to invoke the Page Setup dialog.

Is this topic helpful?​​​​​​​