Client-Side API Reference > OLAP > wijmo.olap > PivotFieldCollection Class |
constructor(engine: PivotEngine): PivotFieldCollection
Initializes a new instance of the PivotFieldCollection class.
PivotEngine that owns this PivotFieldCollection.
Gets a value that indicates whether notifications are currently suspended (see beginUpdate and endUpdate).
Gets or sets the maximum number of fields allowed in this collection.
This property is set to null by default, which means any number of items is allowed.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
deferUpdate(fn: Function): void
Executes a function within a beginUpdate/endUpdate block.
The collection will not be refreshed until the function finishes. This method ensures endUpdate is called even if the function throws an exception.
Function to be executed without updates.
endUpdate(): void
Resumes notifications suspended by a call to beginUpdate.
getField(key: string): PivotField
Gets a field by key.
key to look for.
implementsInterface(interfaceName: string): boolean
Returns true if the caller queries for a supported interface.
Name of the interface to look for.
indexOf(searchElement: any, fromIndex?: number): number
Searches for an item in the array.
Element to locate in the array.
The index where the search should start.
insert(index: number, item: any): void
Inserts an item at a specific position in the array.
Position where the item will be added.
Item to add to the array.
onCollectionChanged(e?: NotifyCollectionChangedEventArgs): void
Raises the collectionChanged event.
Contains a description of the change.
push(...item: any[]): number
Overridden to allow pushing fields by header.
One or more PivotField objects to add to the array.
remove(item: any): boolean
Removes an item from the array.
Item to remove.
removeAt(index: number): void
Removes an item at a specific position in the array.
Position of the item to remove.
setAt(index: number, item: any): void
Assigns an item at a specific position in the array.
Position where the item will be assigned.
Item to assign to the array.
slice(begin?: number, end?: number): any[]
Creates a shallow copy of a portion of an array.
Position where the copy starts.
Position where the copy ends.
sort(compareFn?: Function): any[]
Sorts the elements of the array in place.
Specifies a function that defines the sort order. If specified, the function should take two arguments and should return -1, +1, or 0 to indicate the first argument is smaller, greater than, or equal to the second argument. If omitted, the array is sorted in dictionary order according to the string conversion of each element.
splice(index: number, count: number, item?: any): any[]
Removes and/or adds items to the array.
Position where items will be added or removed.
Number of items to remove from the array.
Item to add to the array.
Occurs when the collection changes.
Represents a collection of PivotField objects.