sap.ui.table.Table.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.table.Table with name
sClassName
and enriches it with the information contained in
oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.ui.core.Control.extend.
Parameters:
{string} | sClassName | Name of the class being created |
{object} | oClassInfo? | Object literal with information about the class |
{function} | FNMetaImpl? | Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata |
Returns:
{function} | Created class / constructor function |
Returns a metadata object for class sap.ui.table.Table.
Returns:
Adds some ariaLabelledBy into the association ariaLabelledBy
.
Parameters:
{string|sap.ui.core.Control} | vAriaLabelledBy | the ariaLabelledBy to add; if empty, nothing is inserted |
Returns:
Adds some column to the aggregation columns
.
Parameters:
Returns:
Adds some extension to the aggregation extension
.
Parameters:
Returns:
Adds some row to the aggregation rows
.
Parameters:
Returns:
Adds the given selection interval to the selection. In case of single selection the "indexTo" value will be used for as selected index.
Parameters:
{int} | iIndexFrom | Index from which . |
{int} | iIndexTo | Indices of the items that shall additionally be selected. |
Returns:
Attaches event handler
fnFunction
to the
busyStateChanged
event of this
sap.ui.table.Table
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.table.Table
itself.
This event gets fired when the busy state of the table changes. It should only be used by composite controls.
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.table.Table itself |
- Since:
- 1.37.0
Returns:
Attaches event handler
fnFunction
to the
cellClick
event of this
sap.ui.table.Table
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.table.Table
itself.
fired when the user clicks a cell of the table (experimental!).
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.table.Table itself |
- Since:
- 1.21.0
Returns:
Attaches event handler
fnFunction
to the
cellContextmenu
event of this
sap.ui.table.Table
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.table.Table
itself.
fired when the user clicks a cell of the table.
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.table.Table itself |
- Since:
- 1.21.0
Returns:
Attaches event handler
fnFunction
to the
columnFreeze
event of this
sap.ui.table.Table
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.table.Table
itself.
fired when a column of the table should be freezed
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.table.Table itself |
- Since:
- 1.21.0
Returns:
Attaches event handler
fnFunction
to the
columnMove
event of this
sap.ui.table.Table
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.table.Table
itself.
fired when a table column is moved.
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.table.Table itself |
Returns:
Attaches event handler
fnFunction
to the
columnResize
event of this
sap.ui.table.Table
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.table.Table
itself.
fired when a table column is resized.
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.table.Table itself |
Returns:
Attaches event handler
fnFunction
to the
columnSelect
event of this
sap.ui.table.Table
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.table.Table
itself.
fired when a column of the table has been selected
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.table.Table itself |
Returns:
Attaches event handler
fnFunction
to the
columnVisibility
event of this
sap.ui.table.Table
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.table.Table
itself.
fired when the visibility of a table column is changed.
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.table.Table itself |
Returns:
Attaches event handler
fnFunction
to the
customFilter
event of this
sap.ui.table.Table
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.table.Table
itself.
This event is triggered when the custom filter item of the column menu is pressed. The column on which the event was triggered is passed as parameter.
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.table.Table itself |
- Since:
- 1.23.0
Returns:
Attaches event handler
fnFunction
to the
filter
event of this
sap.ui.table.Table
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.table.Table
itself.
fired when the table is filtered.
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.table.Table itself |
Returns:
Attaches event handler
fnFunction
to the
firstVisibleRowChanged
event of this
sap.ui.table.Table
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.table.Table
itself.
This event gets fired when the first visible row is changed. It should only be used by composite controls. The event even is fired when setFirstVisibleRow is called programmatically.
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.table.Table itself |
- Since:
- 1.37.0
Returns:
Attaches event handler
fnFunction
to the
group
event of this
sap.ui.table.Table
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.table.Table
itself.
fired when the table is grouped (experimental!).
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.table.Table itself |
Returns:
Attaches event handler
fnFunction
to the
rowSelectionChange
event of this
sap.ui.table.Table
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.table.Table
itself.
fired when the row selection of the table has been changed (the event parameters can be used to determine selection changes - to find out the selected rows you should better use the table selection API)
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.table.Table itself |
Returns:
Attaches event handler
fnFunction
to the
sort
event of this
sap.ui.table.Table
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.table.Table
itself.
fired when the table is sorted.
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.table.Table itself |
Returns:
autoResizeColumn(iColIndex)
Triggers automatic resizing of a column to the widest content.
Experimental API:Experimental! Presently implemented to only work with a very limited set of controls (e.g. sap.m.Text).
Parameters:
{int} | iColIndex | The index of the column in the list of visible columns. |
- Experimental:
- Experimental! Presently implemented to only work with a very limited set of controls (e.g. sap.m.Text).
Binds aggregation
columns
to model data.
See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo
.
Parameters:
{object} | oBindingInfo | The binding information |
Returns:
Parameters:
{object} | oBindingInfo | The binding information |
Returns:
Removes complete selection.
Returns:
Destroys all the columns in the aggregation columns
.
Returns:
Destroys all the extension in the aggregation extension
.
Returns:
Destroys the footer in the aggregation footer
.
Returns:
Destroys the noData in the aggregation noData
.
Returns:
Destroys all the rows in the aggregation rows
.
Returns:
Destroys the title in the aggregation title
.
Returns:
Destroys the toolbar in the aggregation toolbar
.
Returns:
Detaches event handler
fnFunction
from the
busyStateChanged
event of this
sap.ui.table.Table
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
- Since:
- 1.37.0
Returns:
Detaches event handler
fnFunction
from the
cellClick
event of this
sap.ui.table.Table
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
- Since:
- 1.21.0
Returns:
Detaches event handler
fnFunction
from the
cellContextmenu
event of this
sap.ui.table.Table
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
- Since:
- 1.21.0
Returns:
Detaches event handler
fnFunction
from the
columnFreeze
event of this
sap.ui.table.Table
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
- Since:
- 1.21.0
Returns:
Detaches event handler
fnFunction
from the
columnMove
event of this
sap.ui.table.Table
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction
from the
columnResize
event of this
sap.ui.table.Table
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction
from the
columnSelect
event of this
sap.ui.table.Table
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction
from the
columnVisibility
event of this
sap.ui.table.Table
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction
from the
customFilter
event of this
sap.ui.table.Table
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
- Since:
- 1.23.0
Returns:
Detaches event handler
fnFunction
from the
filter
event of this
sap.ui.table.Table
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction
from the
firstVisibleRowChanged
event of this
sap.ui.table.Table
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
- Since:
- 1.37.0
Returns:
Detaches event handler
fnFunction
from the
group
event of this
sap.ui.table.Table
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction
from the
rowSelectionChange
event of this
sap.ui.table.Table
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction
from the
sort
event of this
sap.ui.table.Table
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
exportData(mSettings?): Promise
Creates a new
sap.ui.core.util.Export object and fills row/column information from the table if not provided. For the cell content, the column's "sortProperty" will be used (experimental!)
Please note: The return value was changed from jQuery Promises to standard ES6 Promises. jQuery specific Promise methods ('done', 'fail', 'always', 'pipe' and 'state') are still available but should not be used. Please use only the standard methods 'then' and 'catch'!
Experimental API:Experimental because the property for the column/cell definitions (sortProperty) could change in future.
Parameters:
- Experimental:
- Experimental because the property for the column/cell definitions (sortProperty) could change in future.
Returns:
filter the given column by the given value
Parameters:
{sap.ui.table.Column} | oColumn | column to be filtered |
{string} | sValue | filter value as string (will be converted) |
Returns:
Fires event busyStateChanged
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
- Since:
- 1.37.0
Returns:
fireCellClick(mArguments?): boolean
Fires event
cellClick
to attached listeners.
Listeners may prevent the default action of this event by using the preventDefault
-method on the event object.
Expects the following event parameters:
cellControl
of type sap.ui.core.Control
The control of the cell.cellDomRef
of type Object
DOM reference of the clicked cell. Can be used to position the context menu.rowIndex
of type int
Row index of the selected cell.columnIndex
of type int
Column index of the selected cell. This is the index of visible columns and might differ from the index maintained in the column aggregation.columnId
of type string
Column ID of the selected cell.rowBindingContext
of type sap.ui.model.Context
Row binding context of the selected cell.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
- Since:
- 1.21.0
Returns:
{boolean} | Whether or not to prevent the default action |
fireCellContextmenu(mArguments?): boolean
Fires event
cellContextmenu
to attached listeners.
Listeners may prevent the default action of this event by using the preventDefault
-method on the event object.
Expects the following event parameters:
cellControl
of type sap.ui.core.Control
The control of the cell.cellDomRef
of type Object
DOM reference of the clicked cell. Can be used to position the context menu.rowIndex
of type int
Row index of the selected cell.columnIndex
of type int
Column index of the selected cell. This is the index of visible columns and might differ from the index maintained in the column aggregation.columnId
of type string
Column ID of the selected cell.rowBindingContext
of type sap.ui.model.Context
Row binding context of the selected cell.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
- Since:
- 1.21.0
Returns:
{boolean} | Whether or not to prevent the default action |
fireColumnFreeze(mArguments?): boolean
Fires event
columnFreeze
to attached listeners.
Listeners may prevent the default action of this event by using the preventDefault
-method on the event object.
Expects the following event parameters:
column
of type sap.ui.table.Column
reference to the column to freeze
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
- Since:
- 1.21.0
Returns:
{boolean} | Whether or not to prevent the default action |
fireColumnMove(mArguments?): boolean
Fires event
columnMove
to attached listeners.
Listeners may prevent the default action of this event by using the preventDefault
-method on the event object.
Expects the following event parameters:
column
of type sap.ui.table.Column
moved column.newPos
of type int
new position of the column.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
{boolean} | Whether or not to prevent the default action |
fireColumnResize(mArguments?): boolean
Fires event
columnResize
to attached listeners.
Listeners may prevent the default action of this event by using the preventDefault
-method on the event object.
Expects the following event parameters:
column
of type sap.ui.table.Column
resized column.width
of type sap.ui.core.CSSSize
new width of the table column as CSS Size definition.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
{boolean} | Whether or not to prevent the default action |
fireColumnSelect(mArguments?): boolean
Fires event
columnSelect
to attached listeners.
Listeners may prevent the default action of this event by using the preventDefault
-method on the event object.
Expects the following event parameters:
column
of type sap.ui.table.Column
reference to the selected column
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
{boolean} | Whether or not to prevent the default action |
fireColumnVisibility(mArguments?): boolean
Fires event
columnVisibility
to attached listeners.
Listeners may prevent the default action of this event by using the preventDefault
-method on the event object.
Expects the following event parameters:
column
of type sap.ui.table.Column
affected column.visible
of type boolean
new value of the visible property.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
{boolean} | Whether or not to prevent the default action |
Fires event customFilter
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
- Since:
- 1.23.0
Returns:
fireFilter(mArguments?): boolean
Fires event
filter
to attached listeners.
Listeners may prevent the default action of this event by using the preventDefault
-method on the event object.
Expects the following event parameters:
column
of type sap.ui.table.Column
filtered column.value
of type string
filter value.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
{boolean} | Whether or not to prevent the default action |
Fires event firstVisibleRowChanged
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
- Since:
- 1.37.0
Returns:
fireGroup(mArguments?): boolean
Fires event
group
to attached listeners.
Listeners may prevent the default action of this event by using the preventDefault
-method on the event object.
Expects the following event parameters:
column
of type sap.ui.table.Column
grouped column.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
{boolean} | Whether or not to prevent the default action |
Fires event
rowSelectionChange
to attached listeners.
Expects the following event parameters:
rowIndex
of type int
row index which has been clicked so that the selection has been changed (either selected or deselected)rowContext
of type object
binding context of the row which has been clicked so that selection has been changedrowIndices
of type int[]
array of row indices which selection has been changed (either selected or deselected)selectAll
of type boolean
indicator if "select all" function is used to select rowsuserInteraction
of type boolean
indicates that the event was fired due to an explicit user interaction like clicking the row header or using the keyboard (SPACE or ENTER) to select a row or a range of rows.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
fireSort(mArguments?): boolean
Fires event
sort
to attached listeners.
Listeners may prevent the default action of this event by using the preventDefault
-method on the event object.
Expects the following event parameters:
column
of type sap.ui.table.Column
sorted column.sortOrder
of type sap.ui.table.SortOrder
Sort OrdercolumnAdded
of type boolean
If column was added to sorter this is true. If new sort is started this is set to false
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
{boolean} | Whether or not to prevent the default action |
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy
.
Returns:
getColumnHeaderHeight(): int
Gets current value of property
columnHeaderHeight
.
Height of the column header of the Table in pixel.
Returns:
{int} | Value of property columnHeaderHeight |
getColumnHeaderVisible(): boolean
Gets current value of property
columnHeaderVisible
.
Flag whether the column header is visible or not.
Default value is true
.
Returns:
{boolean} | Value of property columnHeaderVisible |
Gets content of aggregation
columns
.
Columns of the Table
Returns:
getContextByIndex(iIndex): object
Returns the context of a row by its index. Please note that for server-based models like OData, the supplied index might not have been loaded yet. If the context is not available at the client, the binding will trigger a backend request and request this single context. Although this API looks synchronous it may not return a context but load it and fire a change event on the binding.
For server-based models you should consider to only make this API call when the index is within the currently visible scroll area.
Parameters:
{int} | iIndex | Index of the row to return the context from. |
Returns:
getEditable(): boolean
Gets current value of property
editable
.
Flag whether the controls of the Table are editable or not (currently this only controls the background color in certain themes!)
Default value is true
.
Returns:
{boolean} | Value of property editable |
getEnableBusyIndicator(): boolean
Gets current value of property
enableBusyIndicator
.
Set this parameter to true to make the table handle the busy indicator by its own. The table will switch to busy as soon as it scrolls into an unpaged area. This feature can only be used when the navigation mode is set to scrolling.
Default value is false
.
- Since:
- 1.27.0
Returns:
{boolean} | Value of property enableBusyIndicator |
getEnableCellFilter(): boolean
Gets current value of property
enableCellFilter
.
Flag whether to enable or disable the context menu on cells to trigger a filtering with the cell value.
Default value is false
.
- Since:
- 1.21.0
Returns:
{boolean} | Value of property enableCellFilter |
getEnableColumnFreeze(): boolean
Gets current value of property
enableColumnFreeze
.
Flag whether to show or hide the column menu item to freeze or unfreeze a column.
Default value is false
.
- Since:
- 1.21.0
Returns:
{boolean} | Value of property enableColumnFreeze |
getEnableColumnReordering(): boolean
Gets current value of property
enableColumnReordering
.
Flag to enable or disable column reordering
Default value is true
.
Returns:
{boolean} | Value of property enableColumnReordering |
getEnableCustomFilter(): boolean
Gets current value of property
enableCustomFilter
.
Set this parameter to true to implement your own filter behaviour. Instead of the filter input box a button will be rendered for which' press event (customFilter) you can register an event handler.
Default value is false
.
- Since:
- 1.23.0
Returns:
{boolean} | Value of property enableCustomFilter |
getEnableGrouping(): boolean
Gets current value of property
enableGrouping
.
Flag to enable or disable column grouping. (experimental!)
Default value is false
.
Returns:
{boolean} | Value of property enableGrouping |
getEnableSelectAll(): boolean
Gets current value of property
enableSelectAll
.
Specifies if a select all button should be displayed in the top left corner. This button is only displayed if the row selector is visible and the selection mode is set to any kind of multi selection.
Default value is true
.
- Since:
- 1.23.0
Returns:
{boolean} | Value of property enableSelectAll |
Gets content of aggregation
extension
.
Extension section of the Table (if not set it will be hidden)
Returns:
getFirstVisibleRow(): int
Gets current value of property
firstVisibleRow
.
First visible row.
Default value is 0
.
Returns:
{int} | Value of property firstVisibleRow |
getFixedBottomRowCount(): int
Gets current value of property
fixedBottomRowCount
.
Number of rows that are fix on the bottom. When you use a vertical scroll bar, only the rows which are not fixed, will scroll.
Default value is 0
.
- Since:
- 1.18.7
Returns:
{int} | Value of property fixedBottomRowCount |
getFixedColumnCount(): int
Gets current value of property
fixedColumnCount
.
Number of columns that are fix on the left. When you use a horizontal scroll bar, only the columns which are not fixed, will scroll. Fixed columns need a defined width for the feature to work. Please note that the aggregated width of all fixed columns must not exceed the table width since there will be no scrollbar for fixed columns.
Default value is 0
.
Returns:
{int} | Value of property fixedColumnCount |
getFixedRowCount(): int
Gets current value of property
fixedRowCount
.
Number of rows that are fix on the top. When you use a vertical scroll bar, only the rows which are not fixed, will scroll.
Default value is 0
.
Returns:
{int} | Value of property fixedRowCount |
Gets content of aggregation
footer
.
Control or text of footer section of the Table (if not set it will be hidden)
Returns:
ID of the element which is the current target of the association groupBy
, or null
.
Returns:
getMinAutoRowCount(): int
Gets current value of property
minAutoRowCount
.
This property is used to set the minimum count of visible rows when the property visibleRowCountMode is set to Auto or Interactive. For any other visibleRowCountMode, it is ignored.
Default value is 5
.
Returns:
{int} | Value of property minAutoRowCount |
Gets content of aggregation
noData
.
The value for the noData aggregation can be either a string value or a control instance. The control is shown, in case there is no data for the Table available. In case of a string value this will simply replace the no data text.
Returns:
getRowHeight(): int
Gets current value of property
rowHeight
.
Height of a row of the Table in pixel.
Returns:
{int} | Value of property rowHeight |
Gets content of aggregation
rows
.
Rows of the Table
Returns:
getSelectedIndex(): int
Gets current value of property
selectedIndex
.
Zero-based index of selected item. Index value for no selection is -1. When multi-selection is enabled and multiple items are selected, the method returns the lead selected item. Sets the zero-based index of the currently selected item. This method removes any previous selections. When the given index is invalid, the call is ignored.
Default value is -1
.
Returns:
{int} | Value of property selectedIndex |
getSelectedIndices()
Zero-based indices of selected items, wrapped in an array. An empty array means "no selection".
Gets current value of property
selectionBehavior
.
Selection behavior of the Table. This property defines whether the row selector is displayed and whether the row, the row selector or both can be clicked to select a row.
Default value is RowSelector
.
Returns:
Gets current value of property
selectionMode
.
Selection mode of the Table. This property controls whether single or multiple rows can be selected and how the selection can be extended. It may also influence the visual appearance.
Default value is MultiToggle
.
Returns:
getShowColumnVisibilityMenu(): boolean
Gets current value of property
showColumnVisibilityMenu
.
Flag to show or hide the column visibility menu. This menu will get displayed in each generated column header menu. It allows to show or hide columns
Default value is false
.
Returns:
{boolean} | Value of property showColumnVisibilityMenu |
getShowNoData(): boolean
Gets current value of property
showNoData
.
Flag whether to show the no data overlay or not once the table is empty. If set to false the table will just show a grid of empty cells
Default value is true
.
Returns:
{boolean} | Value of property showNoData |
getShowOverlay(): boolean
Gets current value of property
showOverlay
.
Setting this property to true will show an overlay on top of the Table content and users cannot click anymore on the Table content.
Default value is false
.
- Since:
- 1.21.2
Returns:
{boolean} | Value of property showOverlay |
getSortedColumns()
gets sorted columns
getThreshold(): int
Gets current value of property
threshold
.
The threshold
defines how many additional (not yet visible records) shall be pre-fetched to enable smooth scrolling. The threshold is always added to the visibleRowCount
. If the visibleRowCount
is 10 and the threshold
is 100, there will be 110 records fetched with the initial load. If the threshold
is lower than the visibleRowCount
, the visibleRowCount
will be used as the threshold
. If the value is 0 then the thresholding is disabled.
Default value is 100
.
Returns:
{int} | Value of property threshold |
Gets content of aggregation
title
.
Control or text of title section of the Table (if not set it will be hidden)
Returns:
Gets content of aggregation
toolbar
.
Toolbar of the Table (if not set it will be hidden)
Returns:
getVisibleRowCount(): int
Gets current value of property
visibleRowCount
.
Number of visible rows of the table.
Default value is 10
.
Returns:
{int} | Value of property visibleRowCount |
Gets current value of property
visibleRowCountMode
.
This defines how the table handles the visible rows in the table. The default behavior is, that a fixed row count is defined. If you change it to auto the visibleRowCount property is changed by the table automatically. It will then adjust its maximum row count to the space it is allowed to cover (limited by the surrounding container) and its minimum row count to the value of the property minAutoRowCount (default value : 5) In manual mode the user can change the visibleRowCount interactively.
Default value is Fixed
.
- Since:
- 1.9.2
Returns:
Gets current value of property
width
.
Width of the Table.
Default value is auto
.
Returns:
indexOfColumn(oColumn): int
Checks for the provided sap.ui.table.Column
in the aggregation columns
. and returns its index if found or -1 otherwise.
Parameters:
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
indexOfExtension(oExtension): int
Checks for the provided sap.ui.core.Control
in the aggregation extension
. and returns its index if found or -1 otherwise.
Parameters:
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
indexOfRow(oRow): int
Checks for the provided sap.ui.table.Row
in the aggregation rows
. and returns its index if found or -1 otherwise.
Parameters:
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
Inserts a column into the aggregation columns
.
Parameters:
{sap.ui.table.Column} | oColumn | the column to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the column should be inserted at; for a negative value of iIndex , the column is inserted at position 0; for a value greater than the current size of the aggregation, the column is inserted at the last position |
Returns:
Inserts a extension into the aggregation extension
.
Parameters:
{sap.ui.core.Control} | oExtension | the extension to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the extension should be inserted at; for a negative value of iIndex , the extension is inserted at position 0; for a value greater than the current size of the aggregation, the extension is inserted at the last position |
Returns:
Inserts a row into the aggregation rows
.
Parameters:
{sap.ui.table.Row} | oRow | the row to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the row should be inserted at; for a negative value of iIndex , the row is inserted at position 0; for a value greater than the current size of the aggregation, the row is inserted at the last position |
Returns:
isIndexSelected(iIndex): boolean
Returns whether the given index is selected.
Parameters:
{int} | iIndex | Index which is checked for selection state. |
Returns:
Removes all the controls in the association named ariaLabelledBy
.
Returns:
Removes all the controls from the aggregation
columns
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes all the controls from the aggregation
extension
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes all the controls from the aggregation
rows
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes an ariaLabelledBy from the association named ariaLabelledBy
.
Parameters:
{int|string|sap.ui.core.Control} | vAriaLabelledBy | The ariaLabelledByto be removed or its index or ID |
Returns:
Removes a column from the aggregation columns
.
Parameters:
Returns:
Removes a extension from the aggregation extension
.
Parameters:
Returns:
Removes a row from the aggregation rows
.
Parameters:
Returns:
Removes the given selection interval from the selection. In case of single selection this call removeSelectedIndex with the "indexTo" value.
Parameters:
{int} | iIndexFrom | Index from which . |
{int} | iIndexTo | Indices of the items that shall additionally be selected. |
Returns:
selectAll()
Add all rows to the selection. Please note that for server based models like OData the indices which are considered to be selected might not be available at the client yet. Calling getContextByIndex might not return a result but trigger a roundtrip to request this single entity.
Sets a new value for property
columnHeaderHeight
.
Height of the column header of the Table in pixel.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{int} | iColumnHeaderHeight | New value for property columnHeaderHeight |
Returns:
Sets a new value for property
columnHeaderVisible
.
Flag whether the column header is visible or not.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bColumnHeaderVisible | New value for property columnHeaderVisible |
Returns:
Sets a new value for property
editable
.
Flag whether the controls of the Table are editable or not (currently this only controls the background color in certain themes!)
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bEditable | New value for property editable |
Returns:
Sets a new value for property
enableBusyIndicator
.
Set this parameter to true to make the table handle the busy indicator by its own. The table will switch to busy as soon as it scrolls into an unpaged area. This feature can only be used when the navigation mode is set to scrolling.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bEnableBusyIndicator | New value for property enableBusyIndicator |
- Since:
- 1.27.0
Returns:
Sets a new value for property
enableCellFilter
.
Flag whether to enable or disable the context menu on cells to trigger a filtering with the cell value.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bEnableCellFilter | New value for property enableCellFilter |
- Since:
- 1.21.0
Returns:
Sets a new value for property
enableColumnFreeze
.
Flag whether to show or hide the column menu item to freeze or unfreeze a column.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bEnableColumnFreeze | New value for property enableColumnFreeze |
- Since:
- 1.21.0
Returns:
Sets a new value for property
enableColumnReordering
.
Flag to enable or disable column reordering
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bEnableColumnReordering | New value for property enableColumnReordering |
Returns:
Sets a new value for property
enableCustomFilter
.
Set this parameter to true to implement your own filter behaviour. Instead of the filter input box a button will be rendered for which' press event (customFilter) you can register an event handler.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bEnableCustomFilter | New value for property enableCustomFilter |
- Since:
- 1.23.0
Returns:
Sets a new value for property
enableSelectAll
.
Specifies if a select all button should be displayed in the top left corner. This button is only displayed if the row selector is visible and the selection mode is set to any kind of multi selection.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bEnableSelectAll | New value for property enableSelectAll |
- Since:
- 1.23.0
Returns:
Sets a new value for property
firstVisibleRow
.
First visible row.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 0
.
Parameters:
{int} | iFirstVisibleRow | New value for property firstVisibleRow |
Returns:
Sets a new value for property
fixedBottomRowCount
.
Number of rows that are fix on the bottom. When you use a vertical scroll bar, only the rows which are not fixed, will scroll.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 0
.
Parameters:
{int} | iFixedBottomRowCount | New value for property fixedBottomRowCount |
- Since:
- 1.18.7
Returns:
Sets a new value for property
fixedColumnCount
.
Number of columns that are fix on the left. When you use a horizontal scroll bar, only the columns which are not fixed, will scroll. Fixed columns need a defined width for the feature to work. Please note that the aggregated width of all fixed columns must not exceed the table width since there will be no scrollbar for fixed columns.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 0
.
Parameters:
{int} | iFixedColumnCount | New value for property fixedColumnCount |
Returns:
Sets a new value for property
fixedRowCount
.
Number of rows that are fix on the top. When you use a vertical scroll bar, only the rows which are not fixed, will scroll.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 0
.
Parameters:
{int} | iFixedRowCount | New value for property fixedRowCount |
Returns:
Sets the aggregated footer
.
Parameters:
Returns:
Sets the associated groupBy
.
Parameters:
{sap.ui.table.Column} | oGroupBy | Id of an element which becomes the new target of this groupBy association; alternatively, an element instance may be given |
Returns:
Sets a new value for property
minAutoRowCount
.
This property is used to set the minimum count of visible rows when the property visibleRowCountMode is set to Auto or Interactive. For any other visibleRowCountMode, it is ignored.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 5
.
Parameters:
{int} | iMinAutoRowCount | New value for property minAutoRowCount |
Returns:
Sets the aggregated noData
.
Parameters:
Returns:
Sets a new value for property
rowHeight
.
Height of a row of the Table in pixel.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{int} | iRowHeight | New value for property rowHeight |
Returns:
Sets a new value for property
selectedIndex
.
Zero-based index of selected item. Index value for no selection is -1. When multi-selection is enabled and multiple items are selected, the method returns the lead selected item. Sets the zero-based index of the currently selected item. This method removes any previous selections. When the given index is invalid, the call is ignored.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is -1
.
Parameters:
{int} | iSelectedIndex | New value for property selectedIndex |
Returns:
Sets a new value for property
selectionBehavior
.
Selection behavior of the Table. This property defines whether the row selector is displayed and whether the row, the row selector or both can be clicked to select a row.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is RowSelector
.
Parameters:
Returns:
Sets the given selection interval as selection. In case of single selection the "indexTo" value will be used for as selected index.
Parameters:
{int} | iIndexFrom | Index from which . |
{int} | iIndexTo | Indices of the items that shall additionally be selected. |
Returns:
setSelectionMode(sSelectionMode)
Sets the selection mode. The current selection is lost.
Parameters:
{string} | sSelectionMode | the selection mode, see sap.ui.table.SelectionMode |
Sets a new value for property
showColumnVisibilityMenu
.
Flag to show or hide the column visibility menu. This menu will get displayed in each generated column header menu. It allows to show or hide columns
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bShowColumnVisibilityMenu | New value for property showColumnVisibilityMenu |
Returns:
Sets a new value for property
showNoData
.
Flag whether to show the no data overlay or not once the table is empty. If set to false the table will just show a grid of empty cells
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bShowNoData | New value for property showNoData |
Returns:
Sets a new value for property
showOverlay
.
Setting this property to true will show an overlay on top of the Table content and users cannot click anymore on the Table content.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bShowOverlay | New value for property showOverlay |
- Since:
- 1.21.2
Returns:
setThreshold()
Sets the threshold value, which will be added to all data requests in case the Table is bound against an OData service.
Sets the aggregated title
.
Parameters:
Returns:
Sets the aggregated toolbar
.
Parameters:
Returns:
Sets a new value for property
visibleRowCount
.
Number of visible rows of the table.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 10
.
Parameters:
{int} | iVisibleRowCount | New value for property visibleRowCount |
Returns:
Sets a new value for property
visibleRowCountMode
.
This defines how the table handles the visible rows in the table. The default behavior is, that a fixed row count is defined. If you change it to auto the visibleRowCount property is changed by the table automatically. It will then adjust its maximum row count to the space it is allowed to cover (limited by the surrounding container) and its minimum row count to the value of the property minAutoRowCount (default value : 5) In manual mode the user can change the visibleRowCount interactively.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Fixed
.
Parameters:
- Since:
- 1.9.2
Returns:
Sets a new value for property
width
.
Width of the Table.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is auto
.
Parameters:
Returns:
sorts the given column ascending or descending
Parameters:
{sap.ui.table.Column} | oColumn | column to be sorted |
{sap.ui.table.SortOrder} | oSortOrder | sort order of the column (if undefined the default will be ascending) |
{Boolean} | bAdd | Set to true to add the new sort criterion to the existing sort criteria |
Returns:
Unbinds aggregation columns
from model data.
Returns:
Unbinds aggregation rows
from model data.
Returns:
Gets current value of property
navigationMode
.
Determines whether a scrollbar or a paginator is used for navigation inside the table. If the paginator mode is used, it requires the sap.ui.commons
library.
This renders a scrollbar as a navigation element. Data fetched from an OData service is still loaded page-wise no matter which visual representation is used for navigation inside the table.
Default value is Scrollbar
.
- Deprecated:
- As of version 1.38, there is no replacement, since
Scrollbar
is the only supported option
Returns:
Sets a new value for property
navigationMode
.
Determines whether a scrollbar or a paginator is used for navigation inside the table. If the paginator mode is used, it requires the sap.ui.commons
library.
This renders a scrollbar as a navigation element. Data fetched from an OData service is still loaded page-wise no matter which visual representation is used for navigation inside the table.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Scrollbar
.
Parameters:
- Deprecated:
- As of version 1.38, there is no replacement, since
Scrollbar
is the only supported option
Returns: