RowColCollection Class

File
wijmo.grid.js
Module
wijmo.grid
Base Class
ObservableArray
Derived Classes
ColumnCollection, RowCollection
Show
   

Abstract class that serves as a base for row and column collections.

Constructor

Properties

Methods

Events

Constructor

constructor

constructor(g: FlexGrid, defaultSize: number): RowColCollection

Initializes a new instance of the RowColCollection class.

Parameters
Returns
RowColCollection

Properties

defaultSize

Gets or sets the default size of elements in the collection.

Type
number

frozen

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.

Type
number

grid

Gets the FlexGrid that owns this collection.

Type
FlexGrid

isUpdating

Gets a value that indicates whether notifications are currently suspended (see beginUpdate and endUpdate).

Inherited From
ObservableArray
Type

maxSize

Gets or sets the maximum size of elements in the collection.

Type
number

minSize

Gets or sets the minimum size of elements in the collection.

Type
number

visibleLength

Gets the number of visible elements in the collection (isVisible).

Type
number

Methods

beginUpdate

beginUpdate(): void

Suspends notifications until the next call to endUpdate.

Returns
void

canMoveElement

canMoveElement(src: number, dst: number): boolean

Checks whether an element can be moved from one position to another.

Parameters
Returns
boolean

clear

clear(): void

Removes all items from the array.

Inherited From
ObservableArray
Returns
void

deferUpdate

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.

Parameters
Inherited From
ObservableArray
Returns
void

endUpdate

endUpdate(): void

Resumes notifications suspended by a call to beginUpdate.

Inherited From
ObservableArray
Returns
void

getItemAt

getItemAt(position: number): number

Gets the index of the element at a given physical position.

Parameters
Returns
number

getNextCell

getNextCell(index: number, move: SelMove, pageSize: number): void

Finds the next visible cell for a selection change.

Parameters
Returns
void

getTotalSize

getTotalSize(): number

Gets the total size of the elements in the collection.

Returns
number

implementsInterface

implementsInterface(interfaceName: string): boolean

Returns true if the caller queries for a supported interface.

Parameters
Inherited From
ObservableArray
Returns
boolean

indexOf

indexOf(searchElement: any, fromIndex?: number): number

Searches for an item in the array.

Parameters
Inherited From
ObservableArray
Returns
number

insert

insert(index: number, item: any): void

Inserts an item at a specific position in the array.

Parameters
Inherited From
ObservableArray
Returns
void

isFrozen

isFrozen(index: number): boolean

Checks whether a column or row is frozen.

Parameters
Returns
boolean

moveElement

moveElement(src: number, dst: number): void

Moves an element from one position to another.

Parameters
Returns
void

onCollectionChanged

onCollectionChanged(e?: NotifyCollectionChangedEventArgs): void

Keeps track of dirty state and invalidate grid on changes.

Parameters
Returns
void

push

push(item: any): number

Appends an item to the array.

Parameters
Returns
number

remove

remove(item: any): boolean

Removes an item from the array.

Parameters
Inherited From
ObservableArray
Returns
boolean

removeAt

removeAt(index: number): void

Removes an item at a specific position in the array.

Parameters
Inherited From
ObservableArray
Returns
void

setAt

setAt(index: number, item: any): void

Assigns an item at a specific position in the array.

Parameters
Inherited From
ObservableArray
Returns
void

slice

slice(begin?: number, end?: number): any[]

Creates a shallow copy of a portion of an array.

Parameters
Inherited From
ObservableArray
Returns
any[]

sort

sort(compareFn?: Function): this

Sorts the elements of the array in place.

Parameters
Inherited From
ObservableArray
Returns
this

splice

splice(index: number, count: number, item?: any): any[]

Removes or adds items to the array.

Parameters
Returns
any[]

Events

collectionChanged

Occurs when the collection changes.

Inherited From
ObservableArray
Arguments
NotifyCollectionChangedEventArgs