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
   Getting Started
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Pivot Grid
  [Expand]Spreadsheet
  [Collapse]Rich Text Editor
   [Expand]Product Information
    Getting Started
   [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 and Printing
     Import and Export
     Formatting Characters
     Formatting Paragraphs
    [Expand]Fields
     Mail Merge
     Restrictions
     Spell Checking
    [Expand]Client API
    [Expand]Built-in Dialogs
     Adaptivity
     HTML Tag Interpretation
     Keyboard Shortcuts
   [Expand]Examples
  [Expand]Scheduler
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Gauges
  [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]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]Office File API
[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

Sections

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:
clientRichEditName.document.sectionsInfo

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:
clientRichEditName.commands.commandName.execute(parameter_if_any)

Command Name Link Description
Page    
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.
Columns    
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.
Header/Footer    
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.
Dialogs    
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?​​​​​​​