Table

(part of package 'Servoy Extra Components') Extends designtime/SolutionModel: JSWebComponent Extends runtime: RuntimeWebComponent

This is a reference page; many components have detailed usage guides here.

Properties

columns

Type: column[]


currentPage

Type: int Default Value: 1


enableColumnResize

Type: boolean Default Value: false


enableMobileView

Type: boolean


enableSort

Type: boolean Default Value: true


foundset

Type: foundset Default Value: {"foundsetSelector":""}


horizontalScrollbar

By default horizontal scrollbar is shown as needed. Setting to NEVER will always hide it.

Type: string


keyCodeSettings

Enable/Disable key bindings.

Type: keyCodeSettings


minRowHeight

Type: string Default Value: "25px"


pageSize

Number of rows per page, 0 means infinite scrolling mode.

Type: int Default Value: 20


performanceSettings

Settings for incremental scrolling, see github wiki for more details.

Type: settings


responsiveDynamicHeight

When is set, the height is defined by the number of rows; if the calculated height exceeds 'responsiveHeight', then the later will be used as height.

Type: boolean Default Value: false


responsiveHeight

Height of the table, set only in responsive forms.

Type: int Default Value: 300


rowStyleClassDataprovider

Type: dataprovider


selectionClass

Type: styleclass Default Value: "table-servoyextra-selected "


sortColumnIndex

Type: int Default Value: -1


sortDirection

Type: string


sortStyleClass

Type: styleclass Default Value: "selected-column "


sortdownClass

Type: styleclass Default Value: "table-servoyextra-sort-down "


sortupClass

Type: styleclass Default Value: "table-servoyextra-sort-up "


styleClass

Type: styleclass Default Value: "table"


tabSeq

Type: tabseq


visible

Type: visible


Events

onCellClick

Called when the mouse is clicked on a row/cell (foundset and column indexes are given) or when the ENTER key is used (then only the selected foundset index is given). Use the record to exactly match what the user clicked on.

Parameters:

foundsetindex int columnindex int record record event JSEvent columnid string


onCellDoubleClick

Called when the mouse is double clicked on a row/cell (foundset and column indexes are given)

Parameters:

foundsetindex int columnindex int record record event JSEvent columnid string


onCellRightClick

Called when the right mouse button is clicked on a row/cell (foundset and column indexes are given). Use the record to exactly match what the user clicked on.

Parameters:

foundsetindex int columnindex int record record event JSEvent columnid string


onColumnResize

Parameters:

event JSEvent


onFocusGainedMethodID

Parameters:

event JSEvent


onFocusLostMethodID

Parameters:

event JSEvent


onHeaderClick

Parameters:

columnindex int sortdirection string event JSEvent columnid string

Returns: string


onHeaderRightClick

Parameters:

columnindex int sortdirection string event JSEvent columnid string

Returns: string


onViewPortChanged

Parameters:

start int end int


API

getColumn

Gets the column at index. Index is 0 based.

@param index index between 0 and columns length -1 @example

	myElement.getColumn()

@return {column}

Parameters:

index int

Returns: column


getColumnsCount

Gets the number of columns

@example

	myElement.getColumnsCount()

Returns: int


getSortClass

Parameters:

columnIndex int

Returns: string


getViewPortPosition

Returns: object


newColumn

Adds new column at specified index. Index is 0 based.

@param dataproviderid dataprovider of the column @param index index between 0 and columns length @example

	var column = myElement.newColumn('dataproviderid')

@return {column}

Parameters:

dataprovider string index int (optional)

Returns: column


removeAllColumns

Removes all columns.

@example

myElement.removeAllColumns()

@return {boolean}

Returns: boolean


removeColumn

Removes column from specified index. Index is 0 based.

@example

myElement.removeColumn(0)

@param index index between 0 and columns length -1 @return {boolean}

Parameters:

index int

Returns: boolean


requestFocus

Request the focus to the table html element.

@example

myElement.requestFocus();

@param mustExecuteOnFocusGainedMethod (optional) if false will not execute the onFocusGained method; the default value is true

Parameters:

mustExecuteOnFocusGainedMethod boolean (optional)


setSelectedHeader

Parameters:

columnIndex int


Types

column

keyCodeSettings

  • arrowDown

  • arrowUp

  • end

  • enter

  • home

  • pageDown

  • pageUp

settings

  • fastScrollLoadThresholdFactor

    • Type: int

    • Default Value: 2.3

  • fastScrollRenderThresholdFactor

    • Type: int

    • Default Value: 3

  • maxLoadedRows

    • Type: int

    • Default Value: 1000

  • maxRenderedRows

    • Type: int

    • Default Value: 450

  • minBatchSizeForLoadingMoreRows

    • Type: int

    • Default Value: 20

  • minBatchSizeForRenderingMoreRows

    • Type: int

    • Default Value: 10


Last updated