5.20193.637
WjSheet Wijmo API Class

WjSheet Class

Angular 2 component for the wijmo.grid.sheet.Sheet control.

The wj-sheet component must be contained in a wijmo.angular2.grid.sheet.WjFlexSheet component.

Use the wj-sheet component to add Sheet controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.

The WjSheet component is derived from the Sheet control and inherits all its properties, events and methods.

Heirarchy

Properties

columnCount

columnCount: number

Gets or sets the number of columns in the sheet.

filterSetting

filterSetting: IFilterSetting

Gets or sets the filter setting for this sheet.

grid

grid: FlexGrid

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

initialized

initialized: EventEmitter<any>

This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.

isInitialized

isInitialized: boolean

Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.

itemsSource

itemsSource: any

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

name

name: string

Gets or sets the name of the sheet.

nameChangedNg

nameChangedNg: EventEmitter<any>

Angular (EventEmitter) version of the Wijmo nameChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional nameChanged Wijmo event name.

rowCount

rowCount: number

Gets or sets the number of rows in the sheet.

selectionRanges

selectionRanges: ObservableArray

Gets the selection array.

tables

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

visible

visible: boolean

Gets or sets the sheet visibility.

wjProperty

wjProperty: string

Gets or sets a name of a property that this component is assigned to. Default value is 'sheets'.

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.

    • Optional properties: string[]

      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.

    • Optional tableName: string

      The name of the table.

    • Optional tableStyle: TableStyle

      The table style is applied to the table.

    • Optional options: ITableOptions

      The options ITableOptions of the table.

    • Optional shift: boolean

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

    Returns Table

    the table if the table was added successfully, otherwise retun null.

created

  • created(): void
  • If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.

    Returns void

dispose

  • dispose(): void
  • Dispose sheet instance.

    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.

    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.

    Returns ICellStyle

onNameChanged

onVisibleChanged

Events

nameChanged

nameChanged: Event<Sheet, EventArgs>

Occurs after the sheet name has changed.

visibleChanged

visibleChanged: Event<Sheet, EventArgs>

Occurs after the visible of sheet has changed.