Back to Devexpress

SubDocumentCollection<T> Class

aspnetcore-js-devexpress-dot-richedit-dot-subdocumentcollection-1.md

latest2.2 KB
Original Source

SubDocumentCollection<T> Class

A collection of SubDocument objects.

Declaration

ts
export class SubDocumentCollection<T extends SubDocument> extends Collection<T>

Type Parameters

NameTypeDescription
TSubDocument

The type of sub-documents in the collection.

|

Inherited Members

count

getByIndex(index)

Inheritance

Collection<T> SubDocumentCollection<T> SubDocumentCollectionBase

Properties

main Property

Returns the main sub-document.

Declaration

ts
get main(): T

Property Value

TypeDescription
T

The main sub-document.

|

Remarks

Tip

You can access the main sub-document’s properties directly at the document level.

javascript
var mainSubDocumentLength = richEdit.document.length;
// or 
var mainSubDocumentLength = richEdit.document.subDocuments.main.length;

See Also

Document Model

Methods

forEach(callback) Method

Performs the specified action on each element of the current sub-document collection.

Declaration

ts
forEach(
    callback: (subDocument: T) => void
): void

Parameters

NameTypeDescription
callback(subDocument: T) => void

The action to perform on each element of the collection.

|

getById(id) Method

Gets a sub-document with the specified ID.

Declaration

ts
getById(
    id: number
): T

Parameters

NameTypeDescription
idnumber

The sub-document identifier.

|

Returns

TypeDescription
T

A sub-document with the specified identifier.

|