TX Text Control .NET Server

GetItem Method

Method|Introduced in 32.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.dll

Description

Gets a particular footnote from the collection.

Syntax

GetItem()

Gets the footnote at the current text input position. If there is no footnote, null is returned.

public Footnote GetItem();

GetItem(bool)

Gets the next or the previous footnote in the textflow. The search begins at the current text input position.

public Footnote GetItem(bool next);
ParameterDescription
next

If this parameter is true, the next footnote in the textflow is returned. If this parameter is false, the previous footnote in the textflow is returned. The next or the previous footnote is returned independent whether there is a footnote mark at the current text input position.

GetItem(int)

Gets the footnote with the specified identifier.

public Footnote GetItem(int id);
ParameterDescription
id

Specifies the footnote's identifier set with the footnote's constructor or the ID property. The method returns null, if a footnote with the specified identifier does not exist.

GetItem(string)

Gets the footnote with the specified name.

public Footnote GetItem(string name);
ParameterDescription
name

Specifies the footnote's name set with set with the footnote's constructor or the Name property. The method returns null, if a footnote with the specified name does not exist.

Return Value

The return value is null, if a footnote with the specified parameters could not be found. Otherwise, it is an object of the type Footnote.

Examples

The following example works with footnotes in the current document by using FootnoteCollection.get_Item.

textControl.Text = "Customer: Contoso Ltd.";
textControl.Select(10, 12);
FootnoteCollection footnoteCollection = textControl.Footnotes;
footnoteCollection.Add(new Footnote("Source: FY 2026 annual report") { ID = 100 }, false);

Footnote result = footnoteCollection.GetItem(100);
result?.ScrollTo();