Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Section.BeginUpdateFooter(HeaderFooterType) Method

Starts editing the document’s footer of the specified type.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v24.2.Core.dll

NuGet Package: DevExpress.RichEdit.Core

#Declaration

SubDocument BeginUpdateFooter(
    HeaderFooterType type
)

#Parameters

Name Type Description
type HeaderFooterType

A HeaderFooterType enumeration value, representing the type of the footer open for editing.

#Returns

Type Description
SubDocument

A SubDocument instance representing the footer being edited.

#Remarks

Use the Section.BeginUpdateFooter - Section.EndUpdateFooter method pair to edit footer content. If the document has no footer as yet, this method creates a footer of the specified type and opens it for editing.

You can use the Section.HasFooter property to determine whether the document already has a footer.

#Example

View Example

Document document = server.Document;
document.AppendSection();
Section firstSection = document.Sections[0];
// Modify the header of the HeaderFooterType.First type.
SubDocument myHeader = firstSection.BeginUpdateHeader(HeaderFooterType.First);
DocumentRange range = myHeader.InsertText(myHeader.CreatePosition(0), " PAGE NUMBER ");
Field fld = myHeader.Fields.Create(range.End, "PAGE \\* ARABICDASH");
myHeader.Fields.Update();
firstSection.EndUpdateHeader(myHeader);
// Display the header of the HeaderFooterType.First type on the first page.
firstSection.DifferentFirstPage = true;

The following code snippets (auto-collected from DevExpress Examples) contain references to the BeginUpdateFooter(HeaderFooterType) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also