class sap.ui.table.Table

Control sample: sap.ui.table.Table
Visiblity: public
UX Guidelines: Grid Table
Implements:
Available since: N/A
Module: sap/ui/table/Table
Application Component: CA-UI5-TBL

Provides a comprehensive set of features for displaying and dealing with vast amounts of data. The Table control supports desktop PCs and tablet devices. On tablets, special consideration should be given to the number of visible columns and rows due to the limited performance of some devices.

In order to keep the document DOM as lean as possible, the Table control reuses its DOM elements of the rows. When the user scrolls, only the row contexts are changed but the rendered controls remain the same. This allows the Table control to handle huge amounts of data. Nevertheless, restrictions apply regarding the number of displayed columns. Keep the number as low as possible to improve performance. Due to the nature of tables, the used control for column templates also has a big influence on the performance.

The Table control relies completely on data binding, and its supported feature set is tightly coupled to the data model and binding being used.



Documentation links:

This control can be a drag source.
This control can be a drop target.

Constructor

Constructor for a new Table.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.

new sap.ui.table.Table(sId?, mSettings?)
Param Type Default Value Description
sId? string

id for the new control, generated automatically if no id is given

mSettings? object

initial settings for the new control


Properties

Name Type Default Value Description
alternateRowColors boolean false

Enables alternating table row colors. Alternate row coloring is not available for the tree mode.

Since: 1.52.

Visibility: public
columnHeaderHeight int

Header row height in pixel. If a value greater than 0 is set, it overrides the height defined in the rowHeight property for the rows in the table's header. The value defines the minimum height, but it cannot be less than the default height based on the content density configuration. The actual height can increase based on the content.

Note: In a MultiLabel scenario, the height is applied to each individual row of the table's header.

Visibility: public
columnHeaderVisible boolean true

Flag whether the column header is visible or not.

Caution: Please be aware that when setting this property to false, a 100% accessibility of the table can't be guaranteed any more.

Visibility: public
editable boolean true

Flag whether the controls of the Table are editable or not (currently this only controls the background color in certain themes!)

Visibility: public
enableBusyIndicator boolean false

If set to true, the table changes its busy state, resulting in showing or hiding the busy indicator. The table will switch to busy as soon as data is retrieved to be displayed in the currently visible rows. This happens, for example, during scrolling, filtering, or sorting. As soon as the data has been retrieved, the table switches back to not busy. The busy state of the table can still be set manually by calling sap.ui.core.Control#setBusy.

Since: 1.27.0.

Visibility: public
enableCellFilter boolean false

Flag whether to enable or disable the context menu on cells to trigger a filtering with the cell value.

Since: 1.21.0.

Visibility: public
enableColumnFreeze boolean false

Flag whether to show or hide the column menu item to freeze or unfreeze a column.

Since: 1.21.0.

Visibility: public
enableColumnReordering boolean true

Flag to enable or disable column reordering

Visibility: public
enableCustomFilter boolean false

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.

Since: 1.23.0.

Visibility: public
enableGrouping boolean false

Enables or disables grouping. If grouping is enabled, the table is grouped by the column which is defined in the groupBy association.

The following restrictions apply:

  • Only client models are supported (e.g. sap.ui.model.json.JSONModel). Grouping does not work with OData models.
  • The table can only be grouped by one column at a time. Grouping by another column will remove the current grouping.
  • For the grouping to work correctly, sortProperty must be set for the grouped column.
  • If grouping has been done, sorting and filtering is not possible. Any existing sorting and filtering rules do no longer apply. The UI is not updated accordingly (e.g. menu items, sort and filter icons).
  • The column, by which the table is grouped, is not visible. It will become visible again only if the table is grouped by another column or grouping is disabled.

Visibility: public
enableSelectAll boolean true

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.

Since: 1.23.0.

Visibility: public
firstVisibleRow int 0

First visible row.

Visibility: public
fixedBottomRowCount int 0

Number of rows that are fix on the bottom. When you use a vertical scrollbar, only the rows which are not fixed, will scroll.

This property is only supported if the rows aggregation is bound to a client model.

Since: 1.18.7.

Visibility: public
fixedColumnCount int 0

Number of columns that are fixed on the left. Only columns which are not fixed can be scrolled horizontally.

Note

  • Fixed columns need a defined width for the feature to work.
  • The aggregated width of all fixed columns must not exceed the table width. Otherwise the table ignores the value of the property and adapts the behavior in an appropriate way to ensure that the user is still able to scroll horizontally.

Visibility: public
fixedRowCount int 0

Number of rows that are fix on the top. When you use a vertical scrollbar, only the rows which are not fixed, will scroll.

This property is only supported if the rows aggregation is bound to a client model.

Visibility: public
minAutoRowCount int 5

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.

Visibility: public
navigationMode sap.ui.table.NavigationMode Scrollbar

This property has been deprecated and must not be used anymore, since Scrollbar is the only supported option.

Visibility: public
rowActionCount int 0

Number of row actions made visible which determines the width of the row action column. The values 0, 1 and 2 are possible.

Since: 1.45.0.

Visibility: public
rowCountConstraints object

Constraints on the row counts of the table. May impact the result of the row count computation in the row modes. This hidden property may only be used indirectly by row modes and may not be used otherwise.

Visibility: hidden
rowHeight int

Row height in pixel.

In the table's header, it defines the minimum height of the row, but it cannot be less than the default height based on the content density configuration. The actual height can increase based on the content.

In the table's body, it defines the height of the row content. The actual row height is also influenced by other factors, such as the border width. If the visibleRowCountMode property is set to Fixed or Interactive, the value defines the minimum height, and the actual height can increase based on the content. If the mode is Auto, the value defines the actual height, and any content that doesn't fit is cut off.

If no value is set (includes 0), a default height is applied based on the content density configuration. In any visibleRowCountMode, the actual height can increase based on the content.

Visibility: public
selectedIndex int -1

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. Note: If the rows of the table are bound, the value of the property is reset to -1. If a selection plugin is applied to the table, the property is not bindable.

Visibility: public
selectionBehavior sap.ui.table.SelectionBehavior RowSelector

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. Note: Since the group header visualization relies on the row selectors, the row selectors are always shown if the grouping functionality (depends on table type) is enabled, even if sap.ui.table.SelectionBehavior.RowOnly is set.

Visibility: public
selectionMode sap.ui.table.SelectionMode MultiToggle

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. When the selection mode is changed, the current selection is removed. Note: Since the group header visualization relies on the row selectors, the row selectors are always shown if the grouping functionality (depends on table type) is enabled, even if sap.ui.table.SelectionMode.None is set. Note: If a selection plugin is applied to the table, the selection mode is controlled by the plugin.

Visibility: public
showColumnVisibilityMenu boolean false

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

Visibility: public
showNoData boolean true

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

Visibility: public
showOverlay boolean false

Setting this property to true will show an overlay on top of the Table content and users cannot click anymore on the Table content.

Since: 1.21.2.

Visibility: public
threshold int 100

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.

Visibility: public
visibleRowCount int 10

Number of visible rows of the table.

Visibility: public
visibleRowCountMode sap.ui.table.VisibleRowCountMode Fixed

Defines how the table handles the visible rows in the table.

In the "Fixed" mode, the table always has as many rows as defined in the visibleRowCount property.

In the "Auto" mode, the visibleRowCount property is changed by the table automatically. It will then adjust its row count to the space it is allowed to cover (limited by the surrounding container), but it cannot have less than defined in the minAutoRowCount property. The visibleRowCount property cannot be set manually.

Restrictions

  • All rows need to have the same height.
  • The table must be rendered without siblings in its parent DOM element. The only exception is if the parent element is a CSS flex container, and the table is a CSS flex item allowed to grow and shrink.

In the "Interactive" mode, the table has as many rows as defined in the visibleRowCount property after rendering. The user can change the visibleRowCount by dragging a resizer.

Since: 1.9.2.

Visibility: public
width sap.ui.core.CSSSize auto

Width of the Table.

Visibility: public

Aggregations

Default Aggregation: columns

Name Cardinality Type Description
_hiddenDependents 0..n sap.ui.core.Element

Hidden dependents are dependents that are not cloned. But like for normal dependents, their data binding context and lifecycle are bound to the table.

Since: 1.75.

_messageStrip 0..1 sap.ui.core.Control

Defines the message strip to display binding-related messages.

Since: 1.73.

columns (default) 0..n sap.ui.table.Column

Columns of the Table

contextMenu 0..1 sap.ui.core.IContextMenu

Defines the context menu for the table.

Note: The context menu will also be available for the row selectors as well as in the row actions cell of the table control.

The custom context menu will not be shown in group header and summary rows.

If this aggregation is set, then the enableCellFilter property will have no effect.

Since: 1.54.

creationRow 0..1 sap.ui.core.Control

This row can be used for user input to create new data. Like in any other row, the cells of this row are also managed by the table and must not be modified. The cell content is defined via the creationTemplate aggregation of the sap.ui.table.Column. If the creation row is set, the busy indicator will no longer cover the horizontal scrollbar, even if the creation row is invisible.

extension 0..n sap.ui.core.Control

Extension section of the Table. If not set, no extension area will be rendered. Note: In case a sap.m.Toolbar is used as header the CSS class sapMTBHeader-CTX should be applied on this toolbar.

footer 0..1 sap.ui.core.Control

Control or text of footer section of the Table (if not set it will be hidden)

noData 0..1 sap.ui.core.Control

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.

plugins 0..n sap.ui.table.plugins.SelectionPlugin

Plugin section of the table. Multiple plugins are possible, but always only one of a certain type.

The following restrictions apply:

  • If a selection plugin is applied to the table, the table's selection API must not be used. Instead, use the API of the plugin.
  • Only one MultiSelectionPlugin can be applied. No other plugins can be applied.


Since: 1.64.

rowActionTemplate 0..1 sap.ui.table.RowAction

Template for row actions. A template is decoupled from the row or table. Each time the template's properties or aggregations are changed, the template has to be applied again via setRowActionTemplate for the changes to take effect.

rowMode 0..1 sap.ui.core.Element

Row mode

rowSettingsTemplate 0..1 sap.ui.table.RowSettings

Template for row settings. A template is decoupled from the row or table. Each time the template's properties or aggregations are changed, the template has to be applied again via setRowSettingsTemplate for the changes to take effect.

rows 0..n sap.ui.table.Row

This aggregation is managed by the table itself. It can only be used with data binding, is read-only, and does not support templates or factories.

Rows are created and rendered only for a subset of the available data and reused for performance reasons. When scrolling, only the binding contexts are updated to show the correct section of the data. This makes it possible to bind the rows to large data sets. But you must not change rows and their children programmatically, as these changes might get lost when the table updates the rows the next time. Also, properties must not be set to static values, as these would not change when scrolling.

The cells of rows can be defined with the template aggregation of the columns in the columns aggregation of the table. The actions of rows can be defined with the rowActionTemplate aggregation of the table. Furthermore, row-specific settings can be defined with the rowSettingsTemplate aggregation of the table.

title 0..1 sap.ui.core.Control

Control or text of title section of the Table (if not set it will be hidden)
Deprecated as of version 1.72. Use the extension aggregation instead.

toolbar 0..1 sap.ui.core.Toolbar

Toolbar of the Table If not set, no toolbar area will be rendered. Note: The CSS class sapMTBHeader-CTX is applied on the given toolbar.
Deprecated as of version 1.38. This aggregation is deprecated, use the extension aggregation instead.


Associations

Name Cardinality Type Description
ariaLabelledBy 0..n sap.ui.core.Control

Association to controls / ids which label this control (see WAI-ARIA attribute aria-labelledby).

groupBy 0..1 sap.ui.table.Column

The column by which the table is grouped. Grouping will only be performed if enableGrouping is set to true. Setting groupBy in the view does not work and throws an error. It can only be set if the column by which the table is grouped is already part of the columns aggregation of the table.


Events Overview

Event Description
beforeOpenContextMenu

Fired when the user requests the context menu for a table cell.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Since: 1.54.

busyStateChanged

This event gets fired when the busy state of the table changes. It should only be used by composite controls.

Since: 1.37.0.

cellClick

fired when the user clicks a cell of the table (experimental!).

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Since: 1.21.0.

cellContextmenu

fired when the user clicks a cell of the table.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Since: 1.21.0.

columnFreeze

fired when a column of the table should be freezed

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Since: 1.21.0.

columnMove

fired when a table column is moved.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

columnResize

fired when a table column is resized.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

columnSelect

fired when a column of the table has been selected

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

columnVisibility

fired when the visibility of a table column is changed.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

customFilter

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.

Since: 1.23.0.

filter

fired when the table is filtered.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

firstVisibleRowChanged

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.

Since: 1.37.0.

group

fired when the table is grouped (experimental!).

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

paste

This event gets fired when the user pastes content from the clipboard to the table. Pasting can be done with the standard keyboard shortcut, if the focus is inside the table.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Since: 1.60.

rowSelectionChange

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)

Note: If a selection plugin is applied to the table, this event won't be fired.

rowsUpdated

This event is fired after the table rows have been updated due to rendering, a model update, or a user interaction, for example.

Note: This event is fired often and must not be used for performance-critical tasks.

Since: 1.86.

sort

fired when the table is sorted.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

beforeOpenContextMenu

Fired when the user requests the context menu for a table cell.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Since: 1.54.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
rowIndex int

Row index where the context menu opens.

columnIndex int

Column index where the context menu opens. This is the index of the column in the columns aggregation.

contextMenu sap.ui.core.IContextMenu

Context menu

busyStateChanged

This event gets fired when the busy state of the table changes. It should only be used by composite controls.

Since: 1.37.0.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object

cellClick

fired when the user clicks a cell of the table (experimental!).

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Since: 1.21.0.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
cellControl sap.ui.core.Control

The control of the cell.

cellDomRef Object

DOM reference of the clicked cell. Can be used to position the context menu.

rowIndex int

Row index of the selected cell.

columnIndex 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 string

Column ID of the selected cell.

rowBindingContext sap.ui.model.Context

Row binding context of the selected cell.

cellContextmenu

fired when the user clicks a cell of the table.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Since: 1.21.0.

replaced by <code>beforeOpenContextMenu</code>.
Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
cellControl sap.ui.core.Control

The control of the cell.

cellDomRef Object

DOM reference of the clicked cell. Can be used to position the context menu.

rowIndex int

Row index of the selected cell.

columnIndex 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 string

Column ID of the selected cell.

rowBindingContext sap.ui.model.Context

Row binding context of the selected cell.

columnFreeze

fired when a column of the table should be freezed

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Since: 1.21.0.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
column sap.ui.table.Column

reference to the column to freeze

columnMove

fired when a table column is moved.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
column sap.ui.table.Column

moved column.

newPos int

new position of the column.

columnResize

fired when a table column is resized.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
column sap.ui.table.Column

resized column.

width sap.ui.core.CSSSize

new width of the table column as CSS Size definition.

columnSelect

fired when a column of the table has been selected

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
column sap.ui.table.Column

reference to the selected column

columnVisibility

fired when the visibility of a table column is changed.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
column sap.ui.table.Column

affected column.

newVisible boolean

new value of the visible property.

customFilter

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.

Since: 1.23.0.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object

filter

fired when the table is filtered.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
column sap.ui.table.Column

filtered column.

value string

filter value.

firstVisibleRowChanged

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.

Since: 1.37.0.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object

group

fired when the table is grouped (experimental!).

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
column sap.ui.table.Column

grouped column.

paste

This event gets fired when the user pastes content from the clipboard to the table. Pasting can be done with the standard keyboard shortcut, if the focus is inside the table.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Since: 1.60.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
data string[][]

2D array of strings with data from the clipboard. The first dimension represents the rows, and the second dimension represents the cells of the tabular data.

rowSelectionChange

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)

Note: If a selection plugin is applied to the table, this event won't be fired.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
rowIndex int

row index which has been clicked so that the selection has been changed (either selected or deselected)

rowContext object

binding context of the row which has been clicked so that selection has been changed

rowIndices int[]

array of row indices which selection has been changed (either selected or deselected)

selectAll boolean

indicator if "select all" function is used to select rows

userInteraction 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.

rowsUpdated

This event is fired after the table rows have been updated due to rendering, a model update, or a user interaction, for example.

Note: This event is fired often and must not be used for performance-critical tasks.

Since: 1.86.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object

sort

fired when the table is sorted.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
column sap.ui.table.Column

sorted column.

sortOrder sap.ui.table.SortOrder

Sort Order

columnAdded boolean

If column was added to sorter this is true. If new sort is started this is set to false


Methods Overview

Method Description
_enableLegacyMultiSelection

Enables the legacy multi selection behavior for mouse interaction.

_enableSynchronization

Enriches the table with synchronization capabilities exposed through an interface of the SyncExtension applied to the table. Do not call this method more than once on the same table!

References:

  • sap.ui.table.extensions.Synchronization#getInterface

addAriaLabelledBy

Adds some ariaLabelledBy into the association ariaLabelledBy.

addColumn

Adds some column to the aggregation columns.

addExtension

Adds some extension to the aggregation extension.

addPlugin

Adds some plugin to the aggregation plugins.

addRow

Adds some row to the aggregation rows.

addSelectionInterval

Adds the given selection interval to the selection. In case of a single selection, only iIndexTo is added to the selection.

attachBeforeOpenContextMenu

Attaches event handler fnFunction to the beforeOpenContextMenu 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 requests the context menu for a table cell.

attachBusyStateChanged

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.

attachCellClick

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!).

attachCellContextmenu

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.

Since 1.54 replaced by <code>beforeOpenContextMenu</code>.
attachColumnFreeze

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

attachColumnMove

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.

attachColumnResize

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.

attachColumnSelect

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

attachColumnVisibility

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.

attachCustomFilter

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.

attachFilter

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.

attachFirstVisibleRowChanged

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.

attachGroup

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!).

attachPaste

Attaches event handler fnFunction to the paste 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 user pastes content from the clipboard to the table. Pasting can be done with the standard keyboard shortcut, if the focus is inside the table.

attachRowSelectionChange

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)

Note: If a selection plugin is applied to the table, this event won't be fired.

attachRowsUpdated

Attaches event handler fnFunction to the rowsUpdated 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 fired after the table rows have been updated due to rendering, a model update, or a user interaction, for example.

Note: This event is fired often and must not be used for performance-critical tasks.

attachSort

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.

autoResizeColumn

Triggers automatic resizing of a column to the widest content.

bindColumns

Binds aggregation columns to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

bindRows

Binds aggregation rows to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

clearSelection

Removes complete selection.

destroyColumns

Destroys all the columns in the aggregation columns.

destroyContextMenu

Destroys the contextMenu in the aggregation contextMenu.

destroyExtension

Destroys all the extension in the aggregation extension.

destroyFooter

Destroys the footer in the aggregation footer.

destroyNoData

Destroys the noData in the aggregation noData.

destroyPlugins

Destroys all the plugins in the aggregation plugins.

destroyRowActionTemplate

Destroys the rowActionTemplate in the aggregation rowActionTemplate.

destroyRows

Destroys all the rows in the aggregation rows.

destroyRowSettingsTemplate

Destroys the rowSettingsTemplate in the aggregation rowSettingsTemplate.

destroyTitle

Destroys the title in the aggregation title.

Since 1.72 Use the <code>extension</code> aggregation instead.
destroyToolbar

Destroys the toolbar in the aggregation toolbar.

Since 1.38 This aggregation is deprecated, use the <code>extension</code> aggregation instead.
detachBeforeOpenContextMenu

Detaches event handler fnFunction from the beforeOpenContextMenu event of this sap.ui.table.Table.

The passed function and listener object must match the ones used for event registration.

detachBusyStateChanged

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.

detachCellClick

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.

detachCellContextmenu

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.

Since 1.54 replaced by <code>beforeOpenContextMenu</code>.
detachColumnFreeze

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.

detachColumnMove

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.

detachColumnResize

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.

detachColumnSelect

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.

detachColumnVisibility

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.

detachCustomFilter

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.

detachFilter

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.

detachFirstVisibleRowChanged

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.

detachGroup

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.

detachPaste

Detaches event handler fnFunction from the paste event of this sap.ui.table.Table.

The passed function and listener object must match the ones used for event registration.

detachRowSelectionChange

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.

detachRowsUpdated

Detaches event handler fnFunction from the rowsUpdated event of this sap.ui.table.Table.

The passed function and listener object must match the ones used for event registration.

detachSort

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.

exportData

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: This method uses synchronous requests. Support and functioning ends with the support for synchronous requests in browsers.

Since 1.56 replaced by the <code>sap.ui.export</code> library.
sap.ui.table.Table.extend

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.

filter

Filters a column by a value. If no filter value is passed, the filter value equals an empty string, and the filter for this column is removed.

fireBeforeOpenContextMenu

Fires event beforeOpenContextMenu to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

fireBusyStateChanged

Fires event busyStateChanged to attached listeners.

fireCellClick

Fires event cellClick to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

fireCellContextmenu

Fires event cellContextmenu to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Since 1.54 replaced by <code>beforeOpenContextMenu</code>.
fireColumnFreeze

Fires event columnFreeze to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

fireColumnMove

Fires event columnMove to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

fireColumnResize

Fires event columnResize to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

fireColumnSelect

Fires event columnSelect to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

fireColumnVisibility

Fires event columnVisibility to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

fireCustomFilter

Fires event customFilter to attached listeners.

fireFilter

Fires event filter to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

fireFirstVisibleRowChanged

Fires event firstVisibleRowChanged to attached listeners.

fireGroup

Fires event group to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

firePaste

Fires event paste to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

fireRowSelectionChange

Fires event rowSelectionChange to attached listeners.

fireRowsUpdated

Fires event rowsUpdated to attached listeners.

fireSort

Fires event sort to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

getAlternateRowColors

Gets current value of property alternateRowColors.

Enables alternating table row colors. Alternate row coloring is not available for the tree mode.

Default value is false.

getAriaLabelledBy

Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.

getBinding

Get the binding object for a specific aggregation/property.

getCellControl

Returns the control inside the cell with the given row index (in the rows aggregation) and column index (in the columns aggregation or in the list of visible columns only, depending on parameter bVisibleColumnIndex).

The use of this method outside the sap.ui.table library is only allowed for test purposes!

getColumnHeaderHeight

Gets current value of property columnHeaderHeight.

Header row height in pixel. If a value greater than 0 is set, it overrides the height defined in the rowHeight property for the rows in the table's header. The value defines the minimum height, but it cannot be less than the default height based on the content density configuration. The actual height can increase based on the content.

Note: In a MultiLabel scenario, the height is applied to each individual row of the table's header.

getColumnHeaderVisible

Gets current value of property columnHeaderVisible.

Flag whether the column header is visible or not.

Caution: Please be aware that when setting this property to false, a 100% accessibility of the table can't be guaranteed any more.

Default value is true.

getColumns

Gets content of aggregation columns.

Columns of the Table

getComputedFixedColumnCount

In contrast to the function getFixedColumnCount which returns the value of the property fixedColumnCount, this function returns the actual fixed column count computed based on the column spans of the header, the width of the table and the width of the columns.

getContextByIndex

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.

getContextMenu

Gets content of aggregation contextMenu.

Defines the context menu for the table.

Note: The context menu will also be available for the row selectors as well as in the row actions cell of the table control.

The custom context menu will not be shown in group header and summary rows.

If this aggregation is set, then the enableCellFilter property will have no effect.

getCreationRow

Gets the creation row.

getDragDropConfig

Gets content of aggregation dragDropConfig which defines the drag-and-drop configuration.

The following restrictions apply:

  • Columns cannot be configured to be draggable.
  • The following rows are not draggable:
    • Empty rows
    • Group header rows
    • Sum rows
  • Columns cannot be configured to be droppable.
  • The following rows are not droppable:
    • The dragged row itself
    • Empty rows
    • Group header rows
    • Sum rows

getEditable

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.

getEnableBusyIndicator

Gets current value of property enableBusyIndicator.

If set to true, the table changes its busy state, resulting in showing or hiding the busy indicator. The table will switch to busy as soon as data is retrieved to be displayed in the currently visible rows. This happens, for example, during scrolling, filtering, or sorting. As soon as the data has been retrieved, the table switches back to not busy. The busy state of the table can still be set manually by calling sap.ui.core.Control#setBusy.

Default value is false.

getEnableCellFilter

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.

getEnableColumnFreeze

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.

getEnableColumnReordering

Gets current value of property enableColumnReordering.

Flag to enable or disable column reordering

Default value is true.

getEnableCustomFilter

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.

getEnableGrouping

Gets current value of property enableGrouping.

Enables or disables grouping. If grouping is enabled, the table is grouped by the column which is defined in the groupBy association.

The following restrictions apply:

  • Only client models are supported (e.g. sap.ui.model.json.JSONModel). Grouping does not work with OData models.
  • The table can only be grouped by one column at a time. Grouping by another column will remove the current grouping.
  • For the grouping to work correctly, sortProperty must be set for the grouped column.
  • If grouping has been done, sorting and filtering is not possible. Any existing sorting and filtering rules do no longer apply. The UI is not updated accordingly (e.g. menu items, sort and filter icons).
  • The column, by which the table is grouped, is not visible. It will become visible again only if the table is grouped by another column or grouping is disabled.

Default value is false.

getEnableSelectAll

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.

getExtension

Gets content of aggregation extension.

Extension section of the Table. If not set, no extension area will be rendered. Note: In case a sap.m.Toolbar is used as header the CSS class sapMTBHeader-CTX should be applied on this toolbar.

getFirstVisibleRow

Gets current value of property firstVisibleRow.

First visible row.

Default value is 0.

getFixedBottomRowCount

Gets current value of property fixedBottomRowCount.

Number of rows that are fix on the bottom. When you use a vertical scrollbar, only the rows which are not fixed, will scroll.

This property is only supported if the rows aggregation is bound to a client model.

Default value is 0.

getFixedColumnCount

Gets current value of property fixedColumnCount.

Number of columns that are fixed on the left. Only columns which are not fixed can be scrolled horizontally.

Note

  • Fixed columns need a defined width for the feature to work.
  • The aggregated width of all fixed columns must not exceed the table width. Otherwise the table ignores the value of the property and adapts the behavior in an appropriate way to ensure that the user is still able to scroll horizontally.

Default value is 0.

getFixedRowCount

Gets current value of property fixedRowCount.

Number of rows that are fix on the top. When you use a vertical scrollbar, only the rows which are not fixed, will scroll.

This property is only supported if the rows aggregation is bound to a client model.

Default value is 0.

getFooter

Gets content of aggregation footer.

Control or text of footer section of the Table (if not set it will be hidden)

getGroupBy

ID of the element which is the current target of the association groupBy, or null.

sap.ui.table.Table.getMetadata

Returns a metadata object for class sap.ui.table.Table.

getMinAutoRowCount

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.

getNavigationMode

Gets current value of property navigationMode.

This property has been deprecated and must not be used anymore, since Scrollbar is the only supported option.

Default value is Scrollbar.

getNoData

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.

getPlugins

Gets content of aggregation plugins.

Plugin section of the table. Multiple plugins are possible, but always only one of a certain type.

The following restrictions apply:

  • If a selection plugin is applied to the table, the table's selection API must not be used. Instead, use the API of the plugin.
  • Only one MultiSelectionPlugin can be applied. No other plugins can be applied.

getRowActionCount

Gets current value of property rowActionCount.

Number of row actions made visible which determines the width of the row action column. The values 0, 1 and 2 are possible.

Default value is 0.

getRowActionTemplate

Gets content of aggregation rowActionTemplate.

Template for row actions. A template is decoupled from the row or table. Each time the template's properties or aggregations are changed, the template has to be applied again via setRowActionTemplate for the changes to take effect.

getRowHeight

Gets current value of property rowHeight.

Row height in pixel.

In the table's header, it defines the minimum height of the row, but it cannot be less than the default height based on the content density configuration. The actual height can increase based on the content.

In the table's body, it defines the height of the row content. The actual row height is also influenced by other factors, such as the border width. If the visibleRowCountMode property is set to Fixed or Interactive, the value defines the minimum height, and the actual height can increase based on the content. If the mode is Auto, the value defines the actual height, and any content that doesn't fit is cut off.

If no value is set (includes 0), a default height is applied based on the content density configuration. In any visibleRowCountMode, the actual height can increase based on the content.

getRows

Gets content of aggregation rows.

This aggregation is managed by the table itself. It can only be used with data binding, is read-only, and does not support templates or factories.

Rows are created and rendered only for a subset of the available data and reused for performance reasons. When scrolling, only the binding contexts are updated to show the correct section of the data. This makes it possible to bind the rows to large data sets. But you must not change rows and their children programmatically, as these changes might get lost when the table updates the rows the next time. Also, properties must not be set to static values, as these would not change when scrolling.

The cells of rows can be defined with the template aggregation of the columns in the columns aggregation of the table. The actions of rows can be defined with the rowActionTemplate aggregation of the table. Furthermore, row-specific settings can be defined with the rowSettingsTemplate aggregation of the table.

getRowSettingsTemplate

Gets content of aggregation rowSettingsTemplate.

Template for row settings. A template is decoupled from the row or table. Each time the template's properties or aggregations are changed, the template has to be applied again via setRowSettingsTemplate for the changes to take effect.

getSelectedIndex

Retrieves the lead selection index.

Since 1.69 replaced by {@link sap.ui.table.Table#getSelectedIndices}
getSelectedIndices

Zero-based indices of selected items, wrapped in an array. An empty array means "no selection".

getSelectionBehavior

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. Note: Since the group header visualization relies on the row selectors, the row selectors are always shown if the grouping functionality (depends on table type) is enabled, even if sap.ui.table.SelectionBehavior.RowOnly is set.

Default value is RowSelector.

getSelectionMode

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. When the selection mode is changed, the current selection is removed. Note: Since the group header visualization relies on the row selectors, the row selectors are always shown if the grouping functionality (depends on table type) is enabled, even if sap.ui.table.SelectionMode.None is set. Note: If a selection plugin is applied to the table, the selection mode is controlled by the plugin.

Default value is MultiToggle.

getShowColumnVisibilityMenu

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.

getShowNoData

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.

getShowOverlay

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.

getSortedColumns

Gets the sorted columns in the order in which sorting was performed through the sap.ui.table.Table#sort method and menus. Does not reflect sorting at binding level or the columns sort visualization set with sap.ui.table.Column#setSorted and sap.ui.table.Column#setSortOrder.

References:

  • sap.ui.table.Table#sort

getThreshold

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.

getTitle

Gets content of aggregation title.

Control or text of title section of the Table (if not set it will be hidden)

Since 1.72 Use the <code>extension</code> aggregation instead.
getToolbar

Gets content of aggregation toolbar.

Toolbar of the Table If not set, no toolbar area will be rendered. Note: The CSS class sapMTBHeader-CTX is applied on the given toolbar.

Since 1.38 This aggregation is deprecated, use the <code>extension</code> aggregation instead.
getVisibleRowCount

Gets current value of property visibleRowCount.

Number of visible rows of the table.

Default value is 10.

getVisibleRowCountMode

Gets current value of property visibleRowCountMode.

Defines how the table handles the visible rows in the table.

In the "Fixed" mode, the table always has as many rows as defined in the visibleRowCount property.

In the "Auto" mode, the visibleRowCount property is changed by the table automatically. It will then adjust its row count to the space it is allowed to cover (limited by the surrounding container), but it cannot have less than defined in the minAutoRowCount property. The visibleRowCount property cannot be set manually.

Restrictions

  • All rows need to have the same height.
  • The table must be rendered without siblings in its parent DOM element. The only exception is if the parent element is a CSS flex container, and the table is a CSS flex item allowed to grow and shrink.

In the "Interactive" mode, the table has as many rows as defined in the visibleRowCount property after rendering. The user can change the visibleRowCount by dragging a resizer.

Default value is Fixed.

getWidth

Gets current value of property width.

Width of the Table.

Default value is 'auto'.

indexOfColumn

Checks for the provided sap.ui.table.Column in the aggregation columns. and returns its index if found or -1 otherwise.

indexOfExtension

Checks for the provided sap.ui.core.Control in the aggregation extension. and returns its index if found or -1 otherwise.

indexOfPlugin

Checks for the provided sap.ui.table.plugins.SelectionPlugin in the aggregation plugins. and returns its index if found or -1 otherwise.

indexOfRow

Checks for the provided sap.ui.table.Row in the aggregation rows. and returns its index if found or -1 otherwise.

insertColumn

Inserts a column into the aggregation columns.

insertExtension

Inserts a extension into the aggregation extension.

insertPlugin

Inserts a plugin into the aggregation plugins.

insertRow

Inserts a row into the aggregation rows.

isIndexSelected

Checks whether an index is selected.

removeAllAriaLabelledBy

Removes all the controls in the association named ariaLabelledBy.

removeAllColumns

Removes all the controls from the aggregation columns.

Additionally, it unregisters them from the hosting UIArea.

removeAllExtension

Removes all the controls from the aggregation extension.

Additionally, it unregisters them from the hosting UIArea.

removeAllPlugins

Removes all the controls from the aggregation plugins.

Additionally, it unregisters them from the hosting UIArea.

removeAllRows

Removes all the controls from the aggregation rows.

Additionally, it unregisters them from the hosting UIArea.

removeAriaLabelledBy

Removes an ariaLabelledBy from the association named ariaLabelledBy.

removeColumn

Removes a column from the aggregation columns.

removeExtension

Removes a extension from the aggregation extension.

removePlugin

Removes a plugin from the aggregation plugins.

removeRow

Removes a row from the aggregation rows.

removeSelectionInterval

Removes the given selection interval from the selection. In case of single selection, only iIndexTo is removed from the selection.

selectAll

Adds 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.

setAlternateRowColors

Sets a new value for property alternateRowColors.

Enables alternating table row colors. Alternate row coloring is not available for the tree mode.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is false.

setColumnHeaderHeight

Sets a new value for property columnHeaderHeight.

Header row height in pixel. If a value greater than 0 is set, it overrides the height defined in the rowHeight property for the rows in the table's header. The value defines the minimum height, but it cannot be less than the default height based on the content density configuration. The actual height can increase based on the content.

Note: In a MultiLabel scenario, the height is applied to each individual row of the table's header.

When called with a value of null or undefined, the default value of the property will be restored.

setColumnHeaderVisible

Sets a new value for property columnHeaderVisible.

Flag whether the column header is visible or not.

Caution: Please be aware that when setting this property to false, a 100% accessibility of the table can't be guaranteed any more.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is true.

setContextMenu

Sets the aggregated contextMenu.

setCreationRow

Sets the creation row.

setEditable

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.

setEnableBusyIndicator

Sets a new value for property enableBusyIndicator.

If set to true, the table changes its busy state, resulting in showing or hiding the busy indicator. The table will switch to busy as soon as data is retrieved to be displayed in the currently visible rows. This happens, for example, during scrolling, filtering, or sorting. As soon as the data has been retrieved, the table switches back to not busy. The busy state of the table can still be set manually by calling sap.ui.core.Control#setBusy.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is false.

setEnableCellFilter

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.

setEnableColumnFreeze

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.

setEnableColumnReordering

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.

setEnableCustomFilter

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.

setEnableGrouping

Sets a new value for property enableGrouping.

Enables or disables grouping. If grouping is enabled, the table is grouped by the column which is defined in the groupBy association.

The following restrictions apply:

  • Only client models are supported (e.g. sap.ui.model.json.JSONModel). Grouping does not work with OData models.
  • The table can only be grouped by one column at a time. Grouping by another column will remove the current grouping.
  • For the grouping to work correctly, sortProperty must be set for the grouped column.
  • If grouping has been done, sorting and filtering is not possible. Any existing sorting and filtering rules do no longer apply. The UI is not updated accordingly (e.g. menu items, sort and filter icons).
  • The column, by which the table is grouped, is not visible. It will become visible again only if the table is grouped by another column or grouping is disabled.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is false.

setEnableSelectAll

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.

setFirstVisibleRow

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.

setFixedBottomRowCount

Sets a new value for property fixedBottomRowCount.

Number of rows that are fix on the bottom. When you use a vertical scrollbar, only the rows which are not fixed, will scroll.

This property is only supported if the rows aggregation is bound to a client model.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is 0.

setFixedColumnCount

Sets a new value for property fixedColumnCount.

Number of columns that are fixed on the left. Only columns which are not fixed can be scrolled horizontally.

Note

  • Fixed columns need a defined width for the feature to work.
  • The aggregated width of all fixed columns must not exceed the table width. Otherwise the table ignores the value of the property and adapts the behavior in an appropriate way to ensure that the user is still able to scroll horizontally.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is 0.

setFixedRowCount

Sets a new value for property fixedRowCount.

Number of rows that are fix on the top. When you use a vertical scrollbar, only the rows which are not fixed, will scroll.

This property is only supported if the rows aggregation is bound to a client model.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is 0.

setFooter

Sets the aggregated footer.

setGroupBy

Sets the associated groupBy.

setMinAutoRowCount

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.

setNavigationMode

Sets a new value for property navigationMode.

This property has been deprecated and must not be used anymore, since Scrollbar is the only supported option.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is Scrollbar.

setNoData

Sets the aggregated noData.

setRowActionCount

Sets a new value for property rowActionCount.

Number of row actions made visible which determines the width of the row action column. The values 0, 1 and 2 are possible.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is 0.

setRowActionTemplate

Sets the aggregated rowActionTemplate.

setRowHeight

Sets a new value for property rowHeight.

Row height in pixel.

In the table's header, it defines the minimum height of the row, but it cannot be less than the default height based on the content density configuration. The actual height can increase based on the content.

In the table's body, it defines the height of the row content. The actual row height is also influenced by other factors, such as the border width. If the visibleRowCountMode property is set to Fixed or Interactive, the value defines the minimum height, and the actual height can increase based on the content. If the mode is Auto, the value defines the actual height, and any content that doesn't fit is cut off.

If no value is set (includes 0), a default height is applied based on the content density configuration. In any visibleRowCountMode, the actual height can increase based on the content.

When called with a value of null or undefined, the default value of the property will be restored.

setRowSettingsTemplate

Sets the aggregated rowSettingsTemplate.

setSelectedIndex

Sets the selected index. The previous selection is removed.

setSelectionBehavior

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. Note: Since the group header visualization relies on the row selectors, the row selectors are always shown if the grouping functionality (depends on table type) is enabled, even if sap.ui.table.SelectionBehavior.RowOnly is set.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is RowSelector.

setSelectionInterval

Sets the given selection interval as selection. In case of a single selection, only iIndexTo is selected.

setSelectionMode

Sets the selection mode. The current selection is lost.

setShowColumnVisibilityMenu

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.

setShowNoData

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.

setShowOverlay

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.

setThreshold

Sets the threshold value, which will be added to all data requests in case the Table is bound against an OData service.

setTitle

Sets the aggregated title.

Since 1.72 Use the <code>extension</code> aggregation instead.
setToolbar

Sets the aggregated toolbar.

Since 1.38 This aggregation is deprecated, use the <code>extension</code> aggregation instead.
setTooltip

Sets a new tooltip for this object. The tooltip can either be a simple string (which in most cases will be rendered as the title attribute of this Element) or an instance of sap.ui.core.TooltipBase.

If a new tooltip is set, any previously set tooltip is deactivated.

Please note that tooltips are not rendered for the table. The tooltip property will be set but it won't effect the DOM.

setVisibleRowCount

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.

setVisibleRowCountMode

Sets a new value for property visibleRowCountMode.

Defines how the table handles the visible rows in the table.

In the "Fixed" mode, the table always has as many rows as defined in the visibleRowCount property.

In the "Auto" mode, the visibleRowCount property is changed by the table automatically. It will then adjust its row count to the space it is allowed to cover (limited by the surrounding container), but it cannot have less than defined in the minAutoRowCount property. The visibleRowCount property cannot be set manually.

Restrictions

  • All rows need to have the same height.
  • The table must be rendered without siblings in its parent DOM element. The only exception is if the parent element is a CSS flex container, and the table is a CSS flex item allowed to grow and shrink.

In the "Interactive" mode, the table has as many rows as defined in the visibleRowCount property after rendering. The user can change the visibleRowCount by dragging a resizer.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is Fixed.

setWidth

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'.

sort

Sorts the given column ascending or descending.

unbindColumns

Unbinds aggregation columns from model data.

unbindRows

Unbinds aggregation rows from model data.

_enableLegacyMultiSelection

Enables the legacy multi selection behavior for mouse interaction.

_enableSynchronization

Enriches the table with synchronization capabilities exposed through an interface of the SyncExtension applied to the table. Do not call this method more than once on the same table!

References:

addAriaLabelledBy

Adds some ariaLabelledBy into the association ariaLabelledBy.

Param Type DefaultValue Description
vAriaLabelledBy sap.ui.core.ID sap.ui.core.Control

The ariaLabelledBy to add; if empty, nothing is inserted

addColumn

Adds some column to the aggregation columns.

Param Type DefaultValue Description
oColumn sap.ui.table.Column

The column to add; if empty, nothing is inserted

addExtension

Adds some extension to the aggregation extension.

Param Type DefaultValue Description
oExtension sap.ui.core.Control

The extension to add; if empty, nothing is inserted

addPlugin

Adds some plugin to the aggregation plugins.

Param Type DefaultValue Description
oPlugin sap.ui.table.plugins.SelectionPlugin

The plugin to add; if empty, nothing is inserted

addRow

Adds some row to the aggregation rows.

Param Type DefaultValue Description
oRow sap.ui.table.Row

The row to add; if empty, nothing is inserted

addSelectionInterval

Adds the given selection interval to the selection. In case of a single selection, only iIndexTo is added to the selection.

Param Type DefaultValue Description
iIndexFrom int

Index from which the selection starts

iIndexTo int

Index up to which to select

attachBeforeOpenContextMenu

Attaches event handler fnFunction to the beforeOpenContextMenu 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 requests the context menu for a table cell.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.table.Table itself

attachBusyStateChanged

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.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.table.Table itself

attachCellClick

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!).

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.table.Table itself

attachCellContextmenu

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.

Since 1.54 replaced by <code>beforeOpenContextMenu</code>.
Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.table.Table itself

attachColumnFreeze

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

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.table.Table itself

attachColumnMove

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.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.table.Table itself

attachColumnResize

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.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.table.Table itself

attachColumnSelect

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

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.table.Table itself

attachColumnVisibility

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.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.table.Table itself

attachCustomFilter

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.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.table.Table itself

attachFilter

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.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.table.Table itself

attachFirstVisibleRowChanged

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.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.table.Table itself

attachGroup

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!).

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.table.Table itself

attachPaste

Attaches event handler fnFunction to the paste 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 user pastes content from the clipboard to the table. Pasting can be done with the standard keyboard shortcut, if the focus is inside the table.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.table.Table itself

attachRowSelectionChange

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)

Note: If a selection plugin is applied to the table, this event won't be fired.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.table.Table itself

attachRowsUpdated

Attaches event handler fnFunction to the rowsUpdated 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 fired after the table rows have been updated due to rendering, a model update, or a user interaction, for example.

Note: This event is fired often and must not be used for performance-critical tasks.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.table.Table itself

attachSort

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.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.table.Table itself

autoResizeColumn

Triggers automatic resizing of a column to the widest content.

Param Type DefaultValue Description
iColIndex int

The index of the column in the list of visible columns.

bindColumns

Binds aggregation columns to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

Param Type DefaultValue Description
oBindingInfo sap.ui.base.ManagedObject.AggregationBindingInfo

The binding information

bindRows

Binds aggregation rows to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

Param Type DefaultValue Description
oBindingInfo sap.ui.base.ManagedObject.AggregationBindingInfo

The binding information

clearSelection

Removes complete selection.

destroyColumns

Destroys all the columns in the aggregation columns.

destroyContextMenu

Destroys the contextMenu in the aggregation contextMenu.

destroyExtension

Destroys all the extension in the aggregation extension.

destroyFooter

Destroys the footer in the aggregation footer.

destroyNoData

Destroys the noData in the aggregation noData.

destroyPlugins

Destroys all the plugins in the aggregation plugins.

destroyRowActionTemplate

Destroys the rowActionTemplate in the aggregation rowActionTemplate.

destroyRows

Destroys all the rows in the aggregation rows.

destroyRowSettingsTemplate

Destroys the rowSettingsTemplate in the aggregation rowSettingsTemplate.

destroyTitle

Destroys the title in the aggregation title.

Since 1.72 Use the <code>extension</code> aggregation instead.

destroyToolbar

Destroys the toolbar in the aggregation toolbar.

Since 1.38 This aggregation is deprecated, use the <code>extension</code> aggregation instead.

detachBeforeOpenContextMenu

Detaches event handler fnFunction from the beforeOpenContextMenu event of this sap.ui.table.Table.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachBusyStateChanged

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.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachCellClick

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.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachCellContextmenu

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.

Since 1.54 replaced by <code>beforeOpenContextMenu</code>.
Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachColumnFreeze

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.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachColumnMove

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.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachColumnResize

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.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachColumnSelect

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.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachColumnVisibility

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.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachCustomFilter

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.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachFilter

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.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachFirstVisibleRowChanged

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.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachGroup

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.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachPaste

Detaches event handler fnFunction from the paste event of this sap.ui.table.Table.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachRowSelectionChange

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.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachRowsUpdated

Detaches event handler fnFunction from the rowsUpdated event of this sap.ui.table.Table.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachSort

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.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

exportData

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: This method uses synchronous requests. Support and functioning ends with the support for synchronous requests in browsers.

Since 1.56 replaced by the <code>sap.ui.export</code> library.
Param Type DefaultValue Description
mSettings object

settings for the new Export, see sap.ui.core.util.Export constructor

sap.ui.table.Table.extend

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.

Param Type DefaultValue Description
sClassName string

Name of the class being created

oClassInfo object

Object literal with information about the class

FNMetaImpl function

Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class

filter

Filters a column by a value. If no filter value is passed, the filter value equals an empty string, and the filter for this column is removed.

Param Type DefaultValue Description
oColumn sap.ui.table.Column

Column to be filtered

sValue string

Filter value as string (will be converted)

fireBeforeOpenContextMenu

Fires event beforeOpenContextMenu to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

rowIndex int

Row index where the context menu opens.

columnIndex int

Column index where the context menu opens. This is the index of the column in the columns aggregation.

contextMenu sap.ui.core.IContextMenu

Context menu

fireBusyStateChanged

Fires event busyStateChanged to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireCellClick

Fires event cellClick to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

cellControl sap.ui.core.Control

The control of the cell.

cellDomRef Object

DOM reference of the clicked cell. Can be used to position the context menu.

rowIndex int

Row index of the selected cell.

columnIndex 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 string

Column ID of the selected cell.

rowBindingContext sap.ui.model.Context

Row binding context of the selected cell.

fireCellContextmenu

Fires event cellContextmenu to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Since 1.54 replaced by <code>beforeOpenContextMenu</code>.
Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

cellControl sap.ui.core.Control

The control of the cell.

cellDomRef Object

DOM reference of the clicked cell. Can be used to position the context menu.

rowIndex int

Row index of the selected cell.

columnIndex 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 string

Column ID of the selected cell.

rowBindingContext sap.ui.model.Context

Row binding context of the selected cell.

fireColumnFreeze

Fires event columnFreeze to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

column sap.ui.table.Column

reference to the column to freeze

fireColumnMove

Fires event columnMove to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

column sap.ui.table.Column

moved column.

newPos int

new position of the column.

fireColumnResize

Fires event columnResize to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

column sap.ui.table.Column

resized column.

width sap.ui.core.CSSSize

new width of the table column as CSS Size definition.

fireColumnSelect

Fires event columnSelect to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

column sap.ui.table.Column

reference to the selected column

fireColumnVisibility

Fires event columnVisibility to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

column sap.ui.table.Column

affected column.

newVisible boolean

new value of the visible property.

fireCustomFilter

Fires event customFilter to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireFilter

Fires event filter to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

column sap.ui.table.Column

filtered column.

value string

filter value.

fireFirstVisibleRowChanged

Fires event firstVisibleRowChanged to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireGroup

Fires event group to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

column sap.ui.table.Column

grouped column.

firePaste

Fires event paste to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

data string[][]

2D array of strings with data from the clipboard. The first dimension represents the rows, and the second dimension represents the cells of the tabular data.

fireRowSelectionChange

Fires event rowSelectionChange to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

rowIndex int

row index which has been clicked so that the selection has been changed (either selected or deselected)

rowContext object

binding context of the row which has been clicked so that selection has been changed

rowIndices int[]

array of row indices which selection has been changed (either selected or deselected)

selectAll boolean

indicator if "select all" function is used to select rows

userInteraction 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.

fireRowsUpdated

Fires event rowsUpdated to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireSort

Fires event sort to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

column sap.ui.table.Column

sorted column.

sortOrder sap.ui.table.SortOrder

Sort Order

columnAdded boolean

If column was added to sorter this is true. If new sort is started this is set to false

getAlternateRowColors

Gets current value of property alternateRowColors.

Enables alternating table row colors. Alternate row coloring is not available for the tree mode.

Default value is false.

getAriaLabelledBy

Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.

getBinding

Get the binding object for a specific aggregation/property.

Param Type DefaultValue Description
sName string "rows"

Name of the property or aggregation

getCellControl

Returns the control inside the cell with the given row index (in the rows aggregation) and column index (in the columns aggregation or in the list of visible columns only, depending on parameter bVisibleColumnIndex).

The use of this method outside the sap.ui.table library is only allowed for test purposes!

Param Type DefaultValue Description
iRowIndex int

Index of row in the table's rows aggregation

iColumnIndex int

Index of column in the list of visible columns or in the columns aggregation, as indicated with bVisibleColumnIndex

bVisibleColumnIndex boolean

If set to true, the given column index is interpreted as index in the list of visible columns, otherwise as index in the columns aggregation

getColumnHeaderHeight

Gets current value of property columnHeaderHeight.

Header row height in pixel. If a value greater than 0 is set, it overrides the height defined in the rowHeight property for the rows in the table's header. The value defines the minimum height, but it cannot be less than the default height based on the content density configuration. The actual height can increase based on the content.

Note: In a MultiLabel scenario, the height is applied to each individual row of the table's header.

getColumnHeaderVisible

Gets current value of property columnHeaderVisible.

Flag whether the column header is visible or not.

Caution: Please be aware that when setting this property to false, a 100% accessibility of the table can't be guaranteed any more.

Default value is true.

getColumns

Gets content of aggregation columns.

Columns of the Table

getComputedFixedColumnCount

In contrast to the function getFixedColumnCount which returns the value of the property fixedColumnCount, this function returns the actual fixed column count computed based on the column spans of the header, the width of the table and the width of the columns.

getContextByIndex

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.

Param Type DefaultValue Description
iIndex int

Index of the row to return the context from.

getContextMenu

Gets content of aggregation contextMenu.

Defines the context menu for the table.

Note: The context menu will also be available for the row selectors as well as in the row actions cell of the table control.

The custom context menu will not be shown in group header and summary rows.

If this aggregation is set, then the enableCellFilter property will have no effect.

getCreationRow

Gets the creation row.

getDragDropConfig

Gets content of aggregation dragDropConfig which defines the drag-and-drop configuration.

The following restrictions apply:

getEditable

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.

getEnableBusyIndicator

Gets current value of property enableBusyIndicator.

If set to true, the table changes its busy state, resulting in showing or hiding the busy indicator. The table will switch to busy as soon as data is retrieved to be displayed in the currently visible rows. This happens, for example, during scrolling, filtering, or sorting. As soon as the data has been retrieved, the table switches back to not busy. The busy state of the table can still be set manually by calling sap.ui.core.Control#setBusy.

Default value is false.

getEnableCellFilter

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.

getEnableColumnFreeze

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.

getEnableColumnReordering

Gets current value of property enableColumnReordering.

Flag to enable or disable column reordering

Default value is true.

getEnableCustomFilter

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.

getEnableGrouping

Gets current value of property enableGrouping.

Enables or disables grouping. If grouping is enabled, the table is grouped by the column which is defined in the groupBy association.

The following restrictions apply:

Default value is false.

getEnableSelectAll

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.

getExtension

Gets content of aggregation extension.

Extension section of the Table. If not set, no extension area will be rendered. Note: In case a sap.m.Toolbar is used as header the CSS class sapMTBHeader-CTX should be applied on this toolbar.

getFirstVisibleRow

Gets current value of property firstVisibleRow.

First visible row.

Default value is 0.

getFixedBottomRowCount

Gets current value of property fixedBottomRowCount.

Number of rows that are fix on the bottom. When you use a vertical scrollbar, only the rows which are not fixed, will scroll.

This property is only supported if the rows aggregation is bound to a client model.

Default value is 0.

getFixedColumnCount

Gets current value of property fixedColumnCount.

Number of columns that are fixed on the left. Only columns which are not fixed can be scrolled horizontally.

Note

Default value is 0.

getFixedRowCount

Gets current value of property fixedRowCount.

Number of rows that are fix on the top. When you use a vertical scrollbar, only the rows which are not fixed, will scroll.

This property is only supported if the rows aggregation is bound to a client model.

Default value is 0.

getFooter

Gets content of aggregation footer.

Control or text of footer section of the Table (if not set it will be hidden)

getGroupBy

ID of the element which is the current target of the association groupBy, or null.

sap.ui.table.Table.getMetadata

Returns a metadata object for class sap.ui.table.Table.

getMinAutoRowCount

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.

getNavigationMode

Gets current value of property navigationMode.

This property has been deprecated and must not be used anymore, since Scrollbar is the only supported option.

Default value is Scrollbar.

getNoData

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.

getPlugins

Gets content of aggregation plugins.

Plugin section of the table. Multiple plugins are possible, but always only one of a certain type.

The following restrictions apply:

getRowActionCount

Gets current value of property rowActionCount.

Number of row actions made visible which determines the width of the row action column. The values 0, 1 and 2 are possible.

Default value is 0.

getRowActionTemplate

Gets content of aggregation rowActionTemplate.

Template for row actions. A template is decoupled from the row or table. Each time the template's properties or aggregations are changed, the template has to be applied again via setRowActionTemplate for the changes to take effect.

getRowHeight

Gets current value of property rowHeight.

Row height in pixel.

In the table's header, it defines the minimum height of the row, but it cannot be less than the default height based on the content density configuration. The actual height can increase based on the content.

In the table's body, it defines the height of the row content. The actual row height is also influenced by other factors, such as the border width. If the visibleRowCountMode property is set to Fixed or Interactive, the value defines the minimum height, and the actual height can increase based on the content. If the mode is Auto, the value defines the actual height, and any content that doesn't fit is cut off.

If no value is set (includes 0), a default height is applied based on the content density configuration. In any visibleRowCountMode, the actual height can increase based on the content.

getRows

Gets content of aggregation rows.

This aggregation is managed by the table itself. It can only be used with data binding, is read-only, and does not support templates or factories.

Rows are created and rendered only for a subset of the available data and reused for performance reasons. When scrolling, only the binding contexts are updated to show the correct section of the data. This makes it possible to bind the rows to large data sets. But you must not change rows and their children programmatically, as these changes might get lost when the table updates the rows the next time. Also, properties must not be set to static values, as these would not change when scrolling.

The cells of rows can be defined with the template aggregation of the columns in the columns aggregation of the table. The actions of rows can be defined with the rowActionTemplate aggregation of the table. Furthermore, row-specific settings can be defined with the rowSettingsTemplate aggregation of the table.

getRowSettingsTemplate

Gets content of aggregation rowSettingsTemplate.

Template for row settings. A template is decoupled from the row or table. Each time the template's properties or aggregations are changed, the template has to be applied again via setRowSettingsTemplate for the changes to take effect.

getSelectedIndex

Retrieves the lead selection index.

Since 1.69 replaced by {@link sap.ui.table.Table#getSelectedIndices}

getSelectedIndices

Zero-based indices of selected items, wrapped in an array. An empty array means "no selection".

getSelectionBehavior

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. Note: Since the group header visualization relies on the row selectors, the row selectors are always shown if the grouping functionality (depends on table type) is enabled, even if sap.ui.table.SelectionBehavior.RowOnly is set.

Default value is RowSelector.

getSelectionMode

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. When the selection mode is changed, the current selection is removed. Note: Since the group header visualization relies on the row selectors, the row selectors are always shown if the grouping functionality (depends on table type) is enabled, even if sap.ui.table.SelectionMode.None is set. Note: If a selection plugin is applied to the table, the selection mode is controlled by the plugin.

Default value is MultiToggle.

getShowColumnVisibilityMenu

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.

getShowNoData

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.

getShowOverlay

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.

getSortedColumns

Gets the sorted columns in the order in which sorting was performed through the sap.ui.table.Table#sort method and menus. Does not reflect sorting at binding level or the columns sort visualization set with sap.ui.table.Column#setSorted and sap.ui.table.Column#setSortOrder.

References:

getThreshold

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.

getTitle

Gets content of aggregation title.

Control or text of title section of the Table (if not set it will be hidden)

Since 1.72 Use the <code>extension</code> aggregation instead.

getToolbar

Gets content of aggregation toolbar.

Toolbar of the Table If not set, no toolbar area will be rendered. Note: The CSS class sapMTBHeader-CTX is applied on the given toolbar.

Since 1.38 This aggregation is deprecated, use the <code>extension</code> aggregation instead.

getVisibleRowCount

Gets current value of property visibleRowCount.

Number of visible rows of the table.

Default value is 10.

getVisibleRowCountMode

Gets current value of property visibleRowCountMode.

Defines how the table handles the visible rows in the table.

In the "Fixed" mode, the table always has as many rows as defined in the visibleRowCount property.

In the "Auto" mode, the visibleRowCount property is changed by the table automatically. It will then adjust its row count to the space it is allowed to cover (limited by the surrounding container), but it cannot have less than defined in the minAutoRowCount property. The visibleRowCount property cannot be set manually.

Restrictions

In the "Interactive" mode, the table has as many rows as defined in the visibleRowCount property after rendering. The user can change the visibleRowCount by dragging a resizer.

Default value is Fixed.

getWidth

Gets current value of property width.

Width of the Table.

Default value is 'auto'.

indexOfColumn

Checks for the provided sap.ui.table.Column in the aggregation columns. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oColumn sap.ui.table.Column

The column whose index is looked for

indexOfExtension

Checks for the provided sap.ui.core.Control in the aggregation extension. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oExtension sap.ui.core.Control

The extension whose index is looked for

indexOfPlugin

Checks for the provided sap.ui.table.plugins.SelectionPlugin in the aggregation plugins. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oPlugin sap.ui.table.plugins.SelectionPlugin

The plugin whose index is looked for

indexOfRow

Checks for the provided sap.ui.table.Row in the aggregation rows. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oRow sap.ui.table.Row

The row whose index is looked for

insertColumn

Inserts a column into the aggregation columns.

Param Type DefaultValue Description
oColumn sap.ui.table.Column

The column to insert; if empty, nothing is inserted

iIndex int

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

insertExtension

Inserts a extension into the aggregation extension.

Param Type DefaultValue Description
oExtension sap.ui.core.Control

The extension to insert; if empty, nothing is inserted

iIndex int

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

insertPlugin

Inserts a plugin into the aggregation plugins.

Param Type DefaultValue Description
oPlugin sap.ui.table.plugins.SelectionPlugin

The plugin to insert; if empty, nothing is inserted

iIndex int

The 0-based index the plugin should be inserted at; for a negative value of iIndex, the plugin is inserted at position 0; for a value greater than the current size of the aggregation, the plugin is inserted at the last position

insertRow

Inserts a row into the aggregation rows.

Param Type DefaultValue Description
oRow sap.ui.table.Row

The row to insert; if empty, nothing is inserted

iIndex int

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

isIndexSelected

Checks whether an index is selected.

Param Type DefaultValue Description
iIndex int

Index to check for selection

removeAllAriaLabelledBy

Removes all the controls in the association named ariaLabelledBy.

removeAllColumns

Removes all the controls from the aggregation columns.

Additionally, it unregisters them from the hosting UIArea.

removeAllExtension

Removes all the controls from the aggregation extension.

Additionally, it unregisters them from the hosting UIArea.

removeAllPlugins

Removes all the controls from the aggregation plugins.

Additionally, it unregisters them from the hosting UIArea.

removeAllRows

Removes all the controls from the aggregation rows.

Additionally, it unregisters them from the hosting UIArea.

removeAriaLabelledBy

Removes an ariaLabelledBy from the association named ariaLabelledBy.

Param Type DefaultValue Description
vAriaLabelledBy int sap.ui.core.ID sap.ui.core.Control

The ariaLabelledBy to be removed or its index or ID

removeColumn

Removes a column from the aggregation columns.

Param Type DefaultValue Description
vColumn int string sap.ui.table.Column

The column to remove or its index or id

removeExtension

Removes a extension from the aggregation extension.

Param Type DefaultValue Description
vExtension int string sap.ui.core.Control

The extension to remove or its index or id

removePlugin

Removes a plugin from the aggregation plugins.

Param Type DefaultValue Description
vPlugin int string sap.ui.table.plugins.SelectionPlugin

The plugin to remove or its index or id

removeRow

Removes a row from the aggregation rows.

Param Type DefaultValue Description
vRow int string sap.ui.table.Row

The row to remove or its index or id

removeSelectionInterval

Removes the given selection interval from the selection. In case of single selection, only iIndexTo is removed from the selection.

Param Type DefaultValue Description
iIndexFrom int

Index from which the deselection should start

iIndexTo int

Index up to which to deselect

selectAll

Adds 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.

setAlternateRowColors

Sets a new value for property alternateRowColors.

Enables alternating table row colors. Alternate row coloring is not available for the tree mode.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is false.

Param Type DefaultValue Description
bAlternateRowColors boolean false

New value for property alternateRowColors

setColumnHeaderHeight

Sets a new value for property columnHeaderHeight.

Header row height in pixel. If a value greater than 0 is set, it overrides the height defined in the rowHeight property for the rows in the table's header. The value defines the minimum height, but it cannot be less than the default height based on the content density configuration. The actual height can increase based on the content.

Note: In a MultiLabel scenario, the height is applied to each individual row of the table's header.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
iColumnHeaderHeight int

New value for property columnHeaderHeight

setColumnHeaderVisible

Sets a new value for property columnHeaderVisible.

Flag whether the column header is visible or not.

Caution: Please be aware that when setting this property to false, a 100% accessibility of the table can't be guaranteed any more.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is true.

Param Type DefaultValue Description
bColumnHeaderVisible boolean true

New value for property columnHeaderVisible

setContextMenu

Sets the aggregated contextMenu.

Param Type DefaultValue Description
oContextMenu sap.ui.core.IContextMenu

The contextMenu to set

setCreationRow

Sets the creation row.

Param Type DefaultValue Description
oCreationRow sap.ui.table.CreationRow

Instance of the creation row

setEditable

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.

Param Type DefaultValue Description
bEditable boolean true

New value for property editable

setEnableBusyIndicator

Sets a new value for property enableBusyIndicator.

If set to true, the table changes its busy state, resulting in showing or hiding the busy indicator. The table will switch to busy as soon as data is retrieved to be displayed in the currently visible rows. This happens, for example, during scrolling, filtering, or sorting. As soon as the data has been retrieved, the table switches back to not busy. The busy state of the table can still be set manually by calling sap.ui.core.Control#setBusy.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is false.

Param Type DefaultValue Description
bEnableBusyIndicator boolean false

New value for property enableBusyIndicator

setEnableCellFilter

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.

Param Type DefaultValue Description
bEnableCellFilter boolean false

New value for property enableCellFilter

setEnableColumnFreeze

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.

Param Type DefaultValue Description
bEnableColumnFreeze boolean false

New value for property enableColumnFreeze

setEnableColumnReordering

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.

Param Type DefaultValue Description
bEnableColumnReordering boolean true

New value for property enableColumnReordering

setEnableCustomFilter

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.

Param Type DefaultValue Description
bEnableCustomFilter boolean false

New value for property enableCustomFilter

setEnableGrouping

Sets a new value for property enableGrouping.

Enables or disables grouping. If grouping is enabled, the table is grouped by the column which is defined in the groupBy association.

The following restrictions apply:

When called with a value of null or undefined, the default value of the property will be restored.

Default value is false.

Param Type DefaultValue Description
bEnableGrouping boolean false

New value for property enableGrouping

setEnableSelectAll

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.

Param Type DefaultValue Description
bEnableSelectAll boolean true

New value for property enableSelectAll

setFirstVisibleRow

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.

Param Type DefaultValue Description
iFirstVisibleRow int 0

New value for property firstVisibleRow

setFixedBottomRowCount

Sets a new value for property fixedBottomRowCount.

Number of rows that are fix on the bottom. When you use a vertical scrollbar, only the rows which are not fixed, will scroll.

This property is only supported if the rows aggregation is bound to a client model.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is 0.

Param Type DefaultValue Description
iFixedBottomRowCount int 0

New value for property fixedBottomRowCount

setFixedColumnCount

Sets a new value for property fixedColumnCount.

Number of columns that are fixed on the left. Only columns which are not fixed can be scrolled horizontally.

Note

When called with a value of null or undefined, the default value of the property will be restored.

Default value is 0.

Param Type DefaultValue Description
iFixedColumnCount int 0

New value for property fixedColumnCount

setFixedRowCount

Sets a new value for property fixedRowCount.

Number of rows that are fix on the top. When you use a vertical scrollbar, only the rows which are not fixed, will scroll.

This property is only supported if the rows aggregation is bound to a client model.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is 0.

Param Type DefaultValue Description
iFixedRowCount int 0

New value for property fixedRowCount

setFooter

Sets the aggregated footer.

Param Type DefaultValue Description
vFooter sap.ui.core.Control string

The footer to set

setGroupBy

Sets the associated groupBy.

Param Type DefaultValue Description
oGroupBy sap.ui.core.ID sap.ui.table.Column

ID of an element which becomes the new target of this groupBy association; alternatively, an element instance may be given

setMinAutoRowCount

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.

Param Type DefaultValue Description
iMinAutoRowCount int 5

New value for property minAutoRowCount

setNavigationMode

Sets a new value for property navigationMode.

This property has been deprecated and must not be used anymore, since Scrollbar is the only supported option.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is Scrollbar.

Param Type DefaultValue Description
sNavigationMode sap.ui.table.NavigationMode Scrollbar

New value for property navigationMode

setNoData

Sets the aggregated noData.

Param Type DefaultValue Description
vNoData sap.ui.core.Control string

The noData to set

setRowActionCount

Sets a new value for property rowActionCount.

Number of row actions made visible which determines the width of the row action column. The values 0, 1 and 2 are possible.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is 0.

Param Type DefaultValue Description
iRowActionCount int 0

New value for property rowActionCount

setRowActionTemplate

Sets the aggregated rowActionTemplate.

Param Type DefaultValue Description
oRowActionTemplate sap.ui.table.RowAction

The rowActionTemplate to set

setRowHeight

Sets a new value for property rowHeight.

Row height in pixel.

In the table's header, it defines the minimum height of the row, but it cannot be less than the default height based on the content density configuration. The actual height can increase based on the content.

In the table's body, it defines the height of the row content. The actual row height is also influenced by other factors, such as the border width. If the visibleRowCountMode property is set to Fixed or Interactive, the value defines the minimum height, and the actual height can increase based on the content. If the mode is Auto, the value defines the actual height, and any content that doesn't fit is cut off.

If no value is set (includes 0), a default height is applied based on the content density configuration. In any visibleRowCountMode, the actual height can increase based on the content.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
iRowHeight int

New value for property rowHeight

setRowSettingsTemplate

Sets the aggregated rowSettingsTemplate.

Param Type DefaultValue Description
oRowSettingsTemplate sap.ui.table.RowSettings

The rowSettingsTemplate to set

setSelectedIndex

Sets the selected index. The previous selection is removed.

Param Type DefaultValue Description
iIndex int

The index to select

setSelectionBehavior

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. Note: Since the group header visualization relies on the row selectors, the row selectors are always shown if the grouping functionality (depends on table type) is enabled, even if sap.ui.table.SelectionBehavior.RowOnly is set.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is RowSelector.

Param Type DefaultValue Description
sSelectionBehavior sap.ui.table.SelectionBehavior RowSelector

New value for property selectionBehavior

setSelectionInterval

Sets the given selection interval as selection. In case of a single selection, only iIndexTo is selected.

Param Type DefaultValue Description
iIndexFrom int

Index from which the selection starts

iIndexTo int

Index up to which to select

setSelectionMode

Sets the selection mode. The current selection is lost.

Param Type DefaultValue Description
sSelectionMode sap.ui.table.SelectionMode

the selection mode, see sap.ui.table.SelectionMode

setShowColumnVisibilityMenu

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.

Param Type DefaultValue Description
bShowColumnVisibilityMenu boolean false

New value for property showColumnVisibilityMenu

setShowNoData

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.

Param Type DefaultValue Description
bShowNoData boolean true

New value for property showNoData

setShowOverlay

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.

Param Type DefaultValue Description
bShowOverlay boolean false

New value for property showOverlay

setThreshold

Sets the threshold value, which will be added to all data requests in case the Table is bound against an OData service.

Param Type DefaultValue Description
iThreshold int

The threshold

setTitle

Sets the aggregated title.

Since 1.72 Use the <code>extension</code> aggregation instead.
Param Type DefaultValue Description
vTitle sap.ui.core.Control string

The title to set

setToolbar

Sets the aggregated toolbar.

Since 1.38 This aggregation is deprecated, use the <code>extension</code> aggregation instead.
Param Type DefaultValue Description
oToolbar sap.ui.core.Toolbar

The toolbar to set

setTooltip

Sets a new tooltip for this object. The tooltip can either be a simple string (which in most cases will be rendered as the title attribute of this Element) or an instance of sap.ui.core.TooltipBase.

If a new tooltip is set, any previously set tooltip is deactivated.

Please note that tooltips are not rendered for the table. The tooltip property will be set but it won't effect the DOM.

Param Type DefaultValue Description
vTooltip string sap.ui.core.TooltipBase

The tooltip

setVisibleRowCount

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.

Param Type DefaultValue Description
iVisibleRowCount int 10

New value for property visibleRowCount

setVisibleRowCountMode

Sets a new value for property visibleRowCountMode.

Defines how the table handles the visible rows in the table.

In the "Fixed" mode, the table always has as many rows as defined in the visibleRowCount property.

In the "Auto" mode, the visibleRowCount property is changed by the table automatically. It will then adjust its row count to the space it is allowed to cover (limited by the surrounding container), but it cannot have less than defined in the minAutoRowCount property. The visibleRowCount property cannot be set manually.

Restrictions

In the "Interactive" mode, the table has as many rows as defined in the visibleRowCount property after rendering. The user can change the visibleRowCount by dragging a resizer.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is Fixed.

Param Type DefaultValue Description
sVisibleRowCountMode sap.ui.table.VisibleRowCountMode Fixed

New value for property visibleRowCountMode

setWidth

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'.

Param Type DefaultValue Description
sWidth sap.ui.core.CSSSize 'auto'

New value for property width

sort

Sorts the given column ascending or descending.

Param Type DefaultValue Description
oColumn sap.ui.table.Column undefined

Column to be sorted or undefined to clear sorting

oSortOrder sap.ui.table.SortOrder

Sort order of the column (if undefined the default will be ascending)

bAdd boolean

Set to true to add the new sort criterion to the existing sort criteria

unbindColumns

Unbinds aggregation columns from model data.

unbindRows

Unbinds aggregation rows from model data.