ASP.NET MVC Controls
ColumnCollection Class
File
wijmo.grid.js
Module
wijmo.grid
Base Class
RowColCollection

Represents a collection of Column objects in a FlexGrid control.

Constructor

Properties

Methods

Events

Constructor

constructor

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

Initializes a new instance of the RowColCollection class.

Parameters
Inherited From
RowColCollection
Returns
RowColCollection

Properties

defaultSize

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

Inherited From
RowColCollection
Type
number

firstVisibleIndex

Gets the index of the first visible column (where the outline tree is displayed).

Type

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.

Inherited From
RowColCollection
Type
number

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.

Inherited From
RowColCollection
Type
number

minSize

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

Inherited From
RowColCollection
Type
number

Methods

beginUpdate

beginUpdate(): void

Suspends notifications until the next call to endUpdate.

Inherited From
RowColCollection
Returns
void

canMoveElement

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

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

Parameters
  • src: number

    The index of the element to move.

  • dst: number

    The position to which to move the element, or specify -1 to append the element.

Inherited From
RowColCollection
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
  • fn: Function

    Function to be executed without updates.

Inherited From
ObservableArray
Returns
void

endUpdate

endUpdate(): void

Resumes notifications suspended by a call to beginUpdate.

Inherited From
ObservableArray
Returns
void

getColumn

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.

Parameters
  • name: string

    The name or binding to find.

Returns
Column

getItemAt

getItemAt(position: number): number

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

Parameters
  • position: number

    Position of the item in the collection, in pixels.

Inherited From
RowColCollection
Returns
number

getNextCell

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

Finds the next visible cell for a selection change.

Parameters
  • index: number

    Starting index for the search.

  • move: SelMove

    Type of move (size and direction).

  • pageSize: number

    Size of a page (in case the move is a page up/down).

Inherited From
RowColCollection
Returns
void

getTotalSize

getTotalSize(): number

Gets the total size of the elements in the collection.

Inherited From
RowColCollection
Returns
number

implementsInterface

implementsInterface(interfaceName: string): boolean

Returns true if the caller queries for a supported interface.

Parameters
  • interfaceName: string

    Name of the interface to look for.

Inherited From
ObservableArray
Returns
boolean

indexOf

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.

Parameters
  • name: any

    The name or binding to find.

Returns
number

insert

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

Inserts an item at a specific position in the array.

Parameters
  • index: number

    Position where the item will be added.

  • item: any

    Item to add to the array.

Inherited From
ObservableArray
Returns
void

isFrozen

isFrozen(index: number): boolean

Checks whether a row or column is frozen.

Parameters
  • index: number

    The index of the row or column to check.

Inherited From
RowColCollection
Returns
boolean

moveElement

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

Moves an element from one position to another.

Parameters
  • src: number

    Index of the element to move.

  • dst: number

    Position where the element should be moved to (-1 to append).

Inherited From
RowColCollection
Returns
void

onCollectionChanged

onCollectionChanged(e?: NotifyCollectionChangedEventArgs): void

Keeps track of dirty state and invalidate grid on changes.

Parameters
Inherited From
RowColCollection
Returns
void

push

push(item: any): number

Appends an item to the array.

Parameters
  • item: any

    Item to add to the array.

Inherited From
RowColCollection
Returns
number

remove

remove(item: any): boolean

Removes an item from the array.

Parameters
  • item: any

    Item to remove.

Inherited From
ObservableArray
Returns
boolean

removeAt

removeAt(index: number): void

Removes an item at a specific position in the array.

Parameters
  • index: number

    Position of the item to remove.

Inherited From
ObservableArray
Returns
void

setAt

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

Assigns an item at a specific position in the array.

Parameters
  • index: number

    Position where the item will be assigned.

  • item: any

    Item to assign to the array.

Inherited From
ObservableArray
Returns
void

slice

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

Creates a shallow copy of a portion of an array.

Parameters
  • begin: number Optional

    Position where the copy starts.

  • end: number Optional

    Position where the copy ends.

Inherited From
ObservableArray
Returns
any[]

sort

sort(compareFn?: Function): any[]

Sorts the elements of the array in place.

Parameters
  • compareFn: Function Optional

    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.

Inherited From
ObservableArray
Returns
any[]

splice

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

Removes or adds items to the array.

Parameters
  • index: number

    Position where items are added or removed.

  • count: number

    Number of items to remove from the array.

  • item: any Optional

    Item to add to the array.

Inherited From
RowColCollection
Returns
any[]

Events

collectionChanged

Occurs when the collection changes.

Inherited From
ObservableArray
Arguments
NotifyCollectionChangedEventArgs

 

 


Copyright © GrapeCity, inc. All rights reserved.

Product Support Forum |  Documentation Feedback