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: foundsetInitialPageSize 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(foundsetindex,columnindex,record,event,columnid)
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:
onCellDoubleClick(foundsetindex,columnindex,record,event,columnid)
Called when the mouse is double clicked on a row/cell (foundset and column indexes are given)
Parameters:
onCellRightClick(foundsetindex,columnindex,record,event,columnid)
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:
onColumnResize(event)
Parameters:
{JSEvent} event
onFocusGainedMethodID(event)
Parameters:
{JSEvent} event
onFocusLostMethodID(event)
Parameters:
{JSEvent} event
onHeaderClick(columnindex,sortdirection,event,columnid)
@return {string}
Parameters:
Returns: {string}
onHeaderRightClick(columnindex,sortdirection,event,columnid)
@return {string}
Parameters:
Returns: {string}
onViewPortChanged(start,end)
Parameters:
API
getColumn(index)
Gets the column at index. Index is 0 based.
Example:
Parameters:
{int} index ** index index between 0 and columns length -1
Returns: column
getColumnsCount()
Gets the number of columns
Example:
Returns: int
getSortClass(columnIndex)
@return {string}
Parameters:
{int} columnIndex
Returns: string
getViewPortPosition()
@return {object}
Returns: object
newColumn(dataprovider,index)
Adds new column at specified index. Index is 0 based.
Example:
Parameters:
Returns: column
removeAllColumns()
Removes all columns.
Example:
Returns: boolean
removeColumn(index)
Removes column from specified index. Index is 0 based.
Example:
Parameters:
{int} index ** index index between 0 and columns length -1
Returns: boolean
requestFocus(mustExecuteOnFocusGainedMethod)
Request the focus to the table html element.
Example:
Parameters:
{boolean} [mustExecuteOnFocusGainedMethod] ** mustExecuteOnFocusGainedMethod (optional) if false will not execute the onFocusGained method; the default value is true
setSelectedHeader(columnIndex)
Parameters:
{int} columnIndex
Types
column
scripting type: CustomType<servoyextra-table.column>
autoResize
Type: boolean
Default Value: false
dataprovider
Type: dataprovider
format
Type: format
headerStyleClass
Type: styleclass
headerText
Type: tagstring
id
Used to identify the column in cell event handlers, because column index can change if columns are added/removed at runtime.
Type: string
initialWidth
Type: string
showAs
Type: string
Default Value: "text"
styleClass
Type: styleclass
styleClassDataprovider
Type: dataprovider
valuelist
Type: valuelist
width
Type: string
Default Value: "auto"
keyCodeSettings
scripting type: CustomType<servoyextra-table.keyCodeSettings>
arrowDown
Type: boolean
Default Value: true
arrowUp
Type: boolean
Default Value: true
end
Type: boolean
Default Value: true
enter
Type: boolean
Default Value: true
home
Type: boolean
Default Value: true
pageDown
Type: boolean
Default Value: true
pageUp
Type: boolean
Default Value: true
settings
scripting type: CustomType<servoyextra-table.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