aspnetcore-js-devexpress-dot-richedit-daead386.md
Defines a section in the document.
export class Section
Specifies the number of columns in the section’s main document.
get columnCount(): number
set columnCount(columnCount: number)
| Type | Description |
|---|---|
| number |
The number of columns.
|
var sectionColumnCount = richEdit.document.sections.getByIndex(0).columnCount;
Specifies the footer offset.
get footerOffset(): number
set footerOffset(offset: number)
| Type | Description |
|---|---|
| number |
The offset in twips.
|
Specifies the header offset.
get headerOffset(): number
set headerOffset(offset: number)
| Type | Description |
|---|---|
| number |
The offset in twips.
|
Returns the zero-based index of the section in the sections collection.
get index(): number
| Type | Description |
|---|---|
| number |
The section index.
|
You can use the getByIndex(index) method to find a section by its index in the SectionCollection object.
var firstSection = richEdit.document.sections.getByIndex(0);
Gets the text buffer interval occupied by the current section.
get interval(): Interval
| Type | Description |
|---|---|
| Interval |
An object that contains the interval settings.
|
Specifies whether the section’s page orientation is landscape.
get landscape(): boolean
set landscape(landscape: boolean)
| Type | Description |
|---|---|
| boolean |
true if the page orientation is landscape; false if the page orientation is portrait.
|
Specifies the margins of the section’s pages.
get margins(): Margins
set margins(margins: Margins)
| Type | Description |
|---|---|
| Margins |
An object that contains margin settings in twips.
|
var marginSize = richEdit.unitConverter.centimetersToTwips(1);
var margins = new DevExpress.RichEdit.Margins(
marginSize, marginSize, marginSize, marginSize);
richEdit.document.sections.getByIndex(0).margins = margins;
Specifies the size of the section’s pages.
get pageSize(): Size
set pageSize(size: Size)
| Type | Description |
|---|---|
| Size |
An object that contains a page size in twips.
|
var size = new DevExpress.RichEdit.Size(
richEdit.unitConverter.centimetersToTwips(24),
richEdit.unitConverter.centimetersToTwips(18));
richEdit.document.sections.getByIndex(0).pageSize = size;
Specifies the size of the section’s pages.
get paperSize(): PaperSize
set paperSize(paperSize: PaperSize)
| Type | Description |
|---|---|
| PaperSize |
The paper size.
|
Returns a sub-document that is the section’s footer.
getFooter(
type?: HeaderFooterType,
createIfNotExist?: boolean
): SubDocument | null
| Name | Type | Description |
|---|---|---|
| type | HeaderFooterType |
The type of footer to return.
| | createIfNotExist | boolean |
true , to create a footer if it does not exist; false to not create a footer.
|
| Type | Description |
|---|---|
| SubDocument |
The section’s footer (existing or newly created). null if the section does not have a footer.
|
var section = richEdit.document.sections.getByIndex(0);
var subDocument = section.getFooter(DevExpress.RichEdit.HeaderFooterType.Primary, true);
See Also
Returns a sub-document that is the section’s header.
getHeader(
type?: HeaderFooterType,
createIfNotExist?: boolean
): SubDocument | null
| Name | Type | Description |
|---|---|---|
| type | HeaderFooterType |
The type of header to return.
| | createIfNotExist | boolean |
true , to create a header if it does not exist; false to not create a header.
|
| Type | Description |
|---|---|
| SubDocument |
The section’s header (existing or newly created). null if the section does not have a header.
|
var section = richEdit.document.sections.getByIndex(0);
var subDocument = section.getHeader(DevExpress.RichEdit.HeaderFooterType.Primary, true);
See Also