GridPanel Class

File
wijmo.grid.js
Module
wijmo.grid
Derived Classes
FlexSheetPanel

Represents a logical part of the grid, such as the column headers, row headers, and scrollable data part.

Constructor

Properties

Methods

Constructor

constructor

constructor(g: FlexGrid, cellType: CellType, rows: RowCollection, cols: ColumnCollection, host: HTMLElement): GridPanel

Initializes a new instance of the GridPanel class.

Parameters
Returns
GridPanel

Properties

cellType

Gets the type of cell contained in the panel.

Type
CellType

columns

Gets the panel's column collection.

Type
ColumnCollection

grid

Gets the grid that owns the panel.

Type
FlexGrid

height

Gets the total height of the content in this panel.

Type
number

hostElement

Gets the host element for the panel.

Type
HTMLElement

rows

Gets the panel's row collection.

Type
RowCollection

viewRange

Gets a CellRange that indicates the range of cells currently visible on the panel.

Type
CellRange

width

Gets the total width of the content in the panel.

Type
number

Methods

getCellBoundingRect

getCellBoundingRect(r: number, c: number, raw?: boolean): Rect

Gets a cell's bounds in viewport coordinates.

The returned value is a Rect object which contains the position and dimensions of the cell in viewport coordinates. The viewport coordinates are the same as those used by the getBoundingClientRect method.

Parameters
Returns
Rect

getCellData

getCellData(r: number, c: any, formatted: boolean): any

Gets the value stored in a cell in the panel.

Parameters
Returns
any

getCellElement

getCellElement(r: number, c: number): HTMLElement

Gets the element that represents a cell within this GridPanel.

If the cell is not currently in view, this method returns null.

Parameters
Returns
HTMLElement

getSelectedState

getSelectedState(r: number, c: number, rng: CellRange): SelectedState

Gets a SelectedState value that indicates the selected state of a cell.

Parameters
Returns
SelectedState

setCellData

setCellData(r: number, c: any, value: any, coerce?: boolean, invalidate?: boolean): boolean

Sets the content of a cell in the panel.

Parameters
Returns
boolean