ASP.NET MVC Controls
SheetCollection Class
File
wijmo.grid.sheet.js
Module
wijmo.grid.sheet
Base Class
ObservableArray

Defines the collection of the Sheet objects.

Constructor

Properties

Methods

Events

Constructor

constructor

constructor(data?: any[]): ObservableArray

Initializes a new instance of the ObservableArray class.

Parameters
Inherited From
ObservableArray
Returns
ObservableArray

Properties

isUpdating

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

Inherited From
ObservableArray
Type

selectedIndex

Gets or sets the index of the currently selected sheet.

Type
number

Methods

beginUpdate

beginUpdate(): void

Suspends notifications until the next call to endUpdate.

Inherited From
ObservableArray
Returns
void

clear

clear(): void

Clear the SheetCollection.

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

getValidSheetName

getValidSheetName(currentSheet: Sheet): string

Gets the valid name for the sheet.

Parameters
  • currentSheet: Sheet

    The Sheet need get the valid name.

Returns
string

hide

hide(pos: number): boolean

Hides the sheet at the specified position.

Parameters
  • pos: number

    The position of the sheet to hide.

Returns
boolean

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(searchElement: any, fromIndex?: number): number

Searches for an item in the array.

Parameters
  • searchElement: any

    Element to locate in the array.

  • fromIndex: number Optional

    The index where the search should start.

Inherited From
ObservableArray
Returns
number

insert

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

Inserts an item at a specific position in the array. Overrides the insert method of its base class ObservableArray.

Parameters
  • index: number

    Position where the item will be added.

  • item: any

    Item to add to the array.

Returns
void

isValidSheetName

isValidSheetName(sheet: Sheet): boolean

Checks whether the sheet name is valid.

Parameters
  • sheet: Sheet

    The Sheet for which the name needs to check.

Returns
boolean

onCollectionChanged

onCollectionChanged(e?: NotifyCollectionChangedEventArgs): void

Raises the collectionChanged event.

Parameters
Inherited From
ObservableArray
Returns
void

onSelectedSheetChanged

onSelectedSheetChanged(e: PropertyChangedEventArgs): void

Raises the currentChanged event.

Parameters
Returns
void

onSheetCleared

onSheetCleared(): void

Raises the sheetCleared event.

Returns
void

onSheetNameChanged

onSheetNameChanged(e: NotifyCollectionChangedEventArgs): void

Raises the sheetNameChanged event.

Parameters
Returns
void

onSheetVisibleChanged

onSheetVisibleChanged(e: NotifyCollectionChangedEventArgs): void

Raises the sheetVisibleChanged event.

Parameters
Returns
void

push

push(...item: any[]): number

Adds one or more items to the end of the array. Overrides the push method of its base class ObservableArray.

Parameters
  • ...item: any[]

    One or more items to add to the array.

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. Overrides the removeAt method of its base class ObservableArray.

Parameters
  • index: number

    Position of the item to remove.

Returns
void

selectFirst

selectFirst(): boolean

Selects the first sheet in the FlexSheet control.

Returns
boolean

selectLast

selectLast(): boolean

Selects the last sheet in the owner FlexSheet control.

Returns
boolean

selectNext

selectNext(): boolean

Select the next sheet in the owner FlexSheet control.

Returns
boolean

selectPrevious

selectPrevious(): boolean

Selects the previous sheet in the owner FlexSheet control.

Returns
boolean

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

show

show(pos: number): boolean

Unhide and selects the Sheet at the specified position.

Parameters
  • pos: number

    The position of the sheet to show.

Returns
boolean

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 and/or adds items to the array. Overrides the splice method of its base class ObservableArray.

Parameters
  • index: number

    Position where items will be added or removed.

  • count: number

    Number of items to remove from the array.

  • item: any Optional

    Item to add to the array.

Returns
any[]

Events

collectionChanged

Occurs when the collection changes.

Inherited From
ObservableArray
Arguments
NotifyCollectionChangedEventArgs

selectedSheetChanged

Occurs when the selectedIndex property changes.

Arguments
PropertyChangedEventArgs

sheetCleared

Occurs when the SheetCollection is cleared.

Arguments
EventArgs

sheetNameChanged

Occurs after the name of the sheet in the collection has changed.

Arguments
NotifyCollectionChangedEventArgs

sheetVisibleChanged

Occurs after the visible of the sheet in the collection has changed.

Arguments
NotifyCollectionChangedEventArgs

 

 


Copyright © GrapeCity, inc. All rights reserved.

Product Support Forum |  Documentation Feedback