Client-Side API Reference > FlexGrid > wijmo.grid > ColumnCollection Class |
constructor(g: FlexGrid, defaultSize: number): RowColCollection
Initializes a new instance of the RowColCollection class.
The FlexGrid that owns the collection.
The default size of the elements in the collection.
Gets or sets the default size of elements in the collection.
Gets the index of the first visible column (where the outline tree is displayed).
Gets or sets the number of frozen rows or columns in the collection.
Frozen rows and columns do not scroll, and instead remain at the top or left of the grid, next to the fixed cells. Unlike fixed cells, however, frozen cells may be selected and edited like regular cells.
Gets a value that indicates whether notifications are currently suspended (see beginUpdate and endUpdate).
Gets or sets the maximum size of elements in the collection.
Gets or sets the minimum size of elements in the collection.
beginUpdate(): void
Suspends notifications until the next call to endUpdate.
canMoveElement(src: number, dst: number): boolean
Checks whether an element can be moved from one position to another.
The index of the element to move.
The position to which to move the element, or specify -1 to append the element.
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.
getColumn(name: string): Column
Gets a column by name or by binding.
The method searches the column by name. If a column with the given name is not found, it searches by binding. The searches are case-sensitive.
The name or binding to find.
getItemAt(position: number): number
Gets the index of the element at a given physical position.
Position of the item in the collection, in pixels.
getNextCell(index: number, move: SelMove, pageSize: number): void
Finds the next visible cell for a selection change.
Starting index for the search.
Type of move (size and direction).
Size of a page (in case the move is a page up/down).
getTotalSize(): number
Gets the total size of the elements in the collection.
implementsInterface(interfaceName: string): boolean
Returns true if the caller queries for a supported interface.
Name of the interface to look for.
indexOf(name: any): number
Gets the index of a column by name or binding.
The method searches the column by name. If a column with the given name is not found, it searches by binding. The searches are case-sensitive.
The name or binding to find.
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.
isFrozen(index: number): boolean
Checks whether a row or column is frozen.
The index of the row or column to check.
moveElement(src: number, dst: number): void
Moves an element from one position to another.
Index of the element to move.
Position where the element should be moved to (-1 to append).
onCollectionChanged(e?: NotifyCollectionChangedEventArgs): void
Keeps track of dirty state and invalidate grid on changes.
push(item: any): number
Appends an item to the array.
Item 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 or adds items to the array.
Position where items are 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 Column objects in a FlexGrid control.