ASP.NET Core MVC Controls | ComponentOne
In This Topic
    SheetCollection Class
    In This Topic
    File
    wijmo.grid.sheet.js
    Module
    wijmo.grid.sheet
    Base Class
    Sheet

    Defines the collection of the Sheet objects.

    Constructor

    constructor

    constructor(owner?: FlexSheet, grid?: FlexGrid, sheetName?: string, rows?: number, cols?: number): Sheet
    

    Initializes a new instance of the Sheet class.

    Parameters
    • owner: FlexSheet Optional

      The owner FlexSheet control.

    • grid: FlexGrid Optional

      The associated FlexGrid control used to store the sheet data. If not specified then the new FlexGrid control will be created.

    • sheetName: string Optional

      The name of the sheet within the FlexSheet control.

    • rows: number Optional

      The row count for the sheet.

    • cols: number Optional

      The column count for the sheet.

    Inherited From
    Sheet
    Returns
    Sheet

    Properties

    columnCount

    Gets or sets the number of columns in the sheet.

    Inherited From
    Sheet
    Type
    number

    filterSetting

    Gets or sets the filter setting for this sheet.

    Inherited From
    Sheet
    Type
    IFilterSetting

    grid

    Gets the associated FlexGrid control used to store the sheet data.

    Inherited From
    Sheet
    Type
    FlexGrid

    itemsSource

    Gets or sets the array or ICollectionView for the FlexGrid instance of the sheet.

    Inherited From
    Sheet
    Type
    any

    name

    Gets or sets the name of the sheet.

    Inherited From
    Sheet
    Type
    string

    rowCount

    Gets or sets the number of rows in the sheet.

    Inherited From
    Sheet
    Type
    number

    selectedIndex

    Gets or sets the index of the currently selected sheet.

    Type
    number

    selectionRanges

    Gets the selection array.

    Inherited From
    Sheet
    Type
    ObservableArray

    tables

    Gets the collection of the Table objects on this Sheet. It allows to insert/remove Table on this Sheet via the tables collection.

    Inherited From
    Sheet
    Type
    ObservableArray

    visible

    Gets or sets the sheet visibility.

    Inherited From
    Sheet
    Type
    boolean

    Methods

    addTableFromArray

    addTableFromArray(row: number, column: number, array: any[], properties?: string[], tableName?: string, tableStyle?: TableStyle, options?: ITableOptions, shift?: boolean): Table
    

    Add table from an object array.

    Parameters
    • row: number

      The row position of the table.

    • column: number

      The column position of the table.

    • array: any[]

      The object array load to the table.

    • properties: string[] Optional

      It allows to retrieve only a subset of columns from the object of the array. If it is omitted, the table will load all the keys of the object of the array.

    • tableName: string Optional

      The name of the table.

    • tableStyle: TableStyle Optional

      The table style is applied to the table.

    • options: ITableOptions Optional

      The options ITableOptions of the table.

    • shift: boolean Optional

      Indicates whether cells beneath the table should be shifted or not. If not specified cells beneath will be shifted.

    Inherited From
    Sheet
    Returns
    Table

    clear

    clear(): void
    

    Clear the SheetCollection.

    Returns
    void

    dispose

    dispose(): void
    

    Dispose sheet instance.

    Inherited From
    Sheet
    Returns
    void

    findTable

    findTable(rowIndex: number, columnIndex: number): Table
    

    Finds the table via the cell location.

    Parameters
    • rowIndex: number

      the row index of the specified cell.

    • columnIndex: number

      the column index of the specified cell.

    Inherited From
    Sheet
    Returns
    Table

    getCellStyle

    getCellStyle(rowIndex: number, columnIndex: number): ICellStyle
    

    Gets the style of specified cell.

    Parameters
    • rowIndex: number

      the row index of the specified cell.

    • columnIndex: number

      the column index of the specified cell.

    Inherited From
    Sheet
    Returns
    ICellStyle

    getValidSheetName

    getValidSheetName(currentSheet: T): string
    

    Gets the valid name for the sheet.

    Parameters
    • currentSheet: T

      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

    isValidSheetName

    isValidSheetName(sheet: T): boolean
    

    Checks whether the sheet name is valid.

    Parameters
    • sheet: T

      The Sheet for which the name needs to check.

    Returns
    boolean

    onNameChanged

    onNameChanged(e: PropertyChangedEventArgs): void
    

    Raises the nameChanged event.

    Parameters
    Inherited From
    Sheet
    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

    onVisibleChanged

    onVisibleChanged(e: EventArgs): void
    

    Raises the visibleChanged event.

    Parameters
    Inherited From
    Sheet
    Returns
    void

    push

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

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

    Parameters
    • ...item: T[]

      One or more items to add to the array.

    Returns
    number

    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

    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

    splice

    splice(index: number, count: number, ...item: T[]): 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: T[]

      Items to add to the array.

    Returns
    any[]

    Events

    nameChanged

    Occurs after the sheet name has changed.

    Inherited From
    Sheet
    Arguments
    PropertyChangedEventArgs

    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

    visibleChanged

    Occurs after the visible of sheet has changed.

    Inherited From
    Sheet
    Arguments
    EventArgs