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.
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 |
Name | Type | Default Value | Description |
---|---|---|---|
alternateRowColors | boolean | false | Enables alternating table row colors. Alternate row coloring is not available for the tree mode. |
columnHeaderHeight | int | Header row height in pixel. If a value greater than 0 is set, it overrides the height defined in the 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 |
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 |
enableCellFilter | boolean | false | Flag whether to enable or disable the context menu on cells to trigger a filtering with the cell value. |
enableColumnFreeze | boolean | false | Flag whether to show or hide the column menu item to freeze or unfreeze a column. |
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. |
enableGrouping | boolean | false | Enables or disables grouping. If grouping is enabled, the table is grouped by the column which is defined in the The following restrictions apply:
|
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. |
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 |
fixedColumnCount | int | 0 | Number of columns that are fixed on the left. Only columns which are not fixed can be scrolled horizontally. Note
|
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 |
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 |
rowActionCount | int | 0 | Number of row actions made visible which determines the width of the row action column. The values |
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 If no value is set (includes 0), a default height is applied based on the content density configuration. In any |
|
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 |
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 |
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. |
threshold | int | 100 | The |
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 In the Restrictions
In the |
width | sap.ui.core.CSSSize | auto | Width of the Table. Visibility: public |
Default Aggregation: columns
Name | Cardinality | Type | Description |
---|---|---|---|
_messageStrip | 0..1 | sap.ui.core.Control |
Defines the message strip to display binding-related messages. |
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 |
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 |
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 |
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:
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 |
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 |
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) |
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. |
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 |
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 |
busyStateChanged |
This event gets fired when the busy state of the table changes. It should only be used by composite controls. |
cellClick |
fired when the user clicks a cell of the table (experimental!). Listeners may prevent the default action of this event by calling the |
cellContextmenu |
fired when the user clicks a cell of the table. Listeners may prevent the default action of this event by calling the |
columnFreeze |
fired when a column of the table should be freezed Listeners may prevent the default action of this event by calling the |
columnMove |
fired when a table column is moved. Listeners may prevent the default action of this event by calling the |
columnResize |
fired when a table column is resized. Listeners may prevent the default action of this event by calling the |
columnSelect |
fired when a column of the table has been selected Listeners may prevent the default action of this event by calling the |
columnVisibility |
fired when the visibility of a table column is changed. Listeners may prevent the default action of this event by calling the |
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. |
filter |
fired when the table is filtered. Listeners may prevent the default action of this event by calling the |
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. |
group |
fired when the table is grouped (experimental!). Listeners may prevent the default action of this event by calling the |
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 |
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. |
sort |
fired when the table is sorted. Listeners may prevent the default action of this event by calling the |
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 |
contextMenu | sap.ui.core.IContextMenu |
Context menu |
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 |
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. |
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 |
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. |
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. |
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 |
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. |
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 |
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. |
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 |
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. |
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. |
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. |
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 |
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 |
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!
|
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 |
attachBeforeOpenContextMenu |
Attaches event handler When called, the context of the event handler (its Fired when the user requests the context menu for a table cell. |
attachBusyStateChanged |
Attaches event handler When called, the context of the event handler (its This event gets fired when the busy state of the table changes. It should only be used by composite controls. |
attachCellClick |
Attaches event handler When called, the context of the event handler (its fired when the user clicks a cell of the table (experimental!). |
attachCellContextmenu |
Attaches event handler When called, the context of the event handler (its fired when the user clicks a cell of the table.
Since 1.54 replaced by <code>beforeOpenContextMenu</code>.
|
attachColumnFreeze |
Attaches event handler When called, the context of the event handler (its fired when a column of the table should be freezed |
attachColumnMove |
Attaches event handler When called, the context of the event handler (its fired when a table column is moved. |
attachColumnResize |
Attaches event handler When called, the context of the event handler (its fired when a table column is resized. |
attachColumnSelect |
Attaches event handler When called, the context of the event handler (its fired when a column of the table has been selected |
attachColumnVisibility |
Attaches event handler When called, the context of the event handler (its fired when the visibility of a table column is changed. |
attachCustomFilter |
Attaches event handler When called, the context of the event handler (its 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 When called, the context of the event handler (its fired when the table is filtered. |
attachFirstVisibleRowChanged |
Attaches event handler When called, the context of the event handler (its 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 When called, the context of the event handler (its fired when the table is grouped (experimental!). |
attachPaste |
Attaches event handler When called, the context of the event handler (its 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 When called, the context of the event handler (its 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 When called, the context of the event handler (its 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 When called, the context of the event handler (its 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 |
bindRows |
Binds aggregation rows to model data. See ManagedObject.bindAggregation for a detailed description of the possible properties of |
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 The passed function and listener object must match the ones used for event registration. |
detachBusyStateChanged |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachCellClick |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachCellContextmenu |
Detaches event handler 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 The passed function and listener object must match the ones used for event registration. |
detachColumnMove |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachColumnResize |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachColumnSelect |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachColumnVisibility |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachCustomFilter |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachFilter |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachFirstVisibleRowChanged |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachGroup |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachPaste |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachRowSelectionChange |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachRowsUpdated |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachSort |
Detaches event handler 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
|
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 |
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 |
fireCellContextmenu |
Fires event cellContextmenu to attached listeners. Listeners may prevent the default action of this event by calling the
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 |
fireColumnMove |
Fires event columnMove to attached listeners. Listeners may prevent the default action of this event by calling the |
fireColumnResize |
Fires event columnResize to attached listeners. Listeners may prevent the default action of this event by calling the |
fireColumnSelect |
Fires event columnSelect to attached listeners. Listeners may prevent the default action of this event by calling the |
fireColumnVisibility |
Fires event columnVisibility to attached listeners. Listeners may prevent the default action of this event by calling the |
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 |
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 |
firePaste |
Fires event paste to attached listeners. Listeners may prevent the default action of this event by calling the |
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 |
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 |
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 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 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 Default value is |
getColumns |
Gets content of aggregation columns. Columns of the Table |
getComputedFixedColumnCount |
In contrast to the function |
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 |
getCreationRow |
Gets the creation row. |
getDragDropConfig |
Gets content of aggregation 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 |
getEnableBusyIndicator |
Gets current value of property enableBusyIndicator. If set to Default value is |
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 |
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 |
getEnableColumnReordering |
Gets current value of property enableColumnReordering. Flag to enable or disable column reordering Default value is |
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 |
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 The following restrictions apply:
Default value is |
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 |
getExtension |
Gets content of aggregation extension. Extension section of the Table. If not set, no extension area will be rendered. Note: In case a |
getFirstVisibleRow |
Gets current value of property firstVisibleRow. First visible row. Default value is |
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 Default value is |
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 |
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 Default value is |
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 |
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 |
getNavigationMode |
Gets current value of property navigationMode. This property has been deprecated and must not be used anymore, since Default value is |
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 Default value is |
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 |
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 If no value is set (includes 0), a default height is applied based on the content density configuration. In any |
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 |
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 Default value is |
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 Default value is |
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 |
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 |
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 |
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.
|
getThreshold |
Gets current value of property threshold. The Default value is |
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 |
getVisibleRowCountMode |
Gets current value of property visibleRowCountMode. Defines how the table handles the visible rows in the table. In the In the Restrictions
In the Default value is |
getWidth |
Gets current value of property width. Width of the Table. Default value is |
indexOfColumn |
Checks for the provided |
indexOfExtension |
Checks for the provided |
indexOfPlugin |
Checks for the provided |
indexOfRow |
Checks for the provided |
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 |
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 Default value is |
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 Note: In a MultiLabel scenario, the height is applied to each individual row of the table's header. When called with a value of |
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 When called with a value of Default value is |
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 Default value is |
setEnableBusyIndicator |
Sets a new value for property enableBusyIndicator. If set to When called with a value of Default value is |
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 Default value is |
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 Default value is |
setEnableColumnReordering |
Sets a new value for property enableColumnReordering. Flag to enable or disable column reordering When called with a value of Default value is |
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 Default value is |
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 The following restrictions apply:
When called with a value of Default value is |
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 Default value is |
setFirstVisibleRow |
Sets a new value for property firstVisibleRow. First visible row. When called with a value of Default value is |
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 When called with a value of Default value is |
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 Default value is |
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 When called with a value of Default value is |
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 Default value is |
setNavigationMode |
Sets a new value for property navigationMode. This property has been deprecated and must not be used anymore, since When called with a value of Default value is |
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 When called with a value of Default value is |
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 If no value is set (includes 0), a default height is applied based on the content density configuration. In any When called with a value of |
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 When called with a value of Default value is |
setSelectionInterval |
Sets the given selection interval as selection. In case of a single selection, only |
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 Default value is |
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 Default value is |
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 Default value is |
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 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 Default value is |
setVisibleRowCountMode |
Sets a new value for property visibleRowCountMode. Defines how the table handles the visible rows in the table. In the In the Restrictions
In the When called with a value of Default value is |
setWidth |
Sets a new value for property width. Width of the Table. When called with a value of Default value is |
sort |
Sorts the given column ascending or descending. |
unbindColumns |
Unbinds aggregation columns from model data. |
unbindRows |
Unbinds aggregation rows from model data. |
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:
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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. |
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 |
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 |
Destroys the title in the aggregation title.
Destroys the toolbar in the aggregation toolbar.
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
mSettings | object |
settings for the new Export, see sap.ui.core.util.Export |
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 |
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) |
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 |
|
contextMenu | sap.ui.core.IContextMenu |
Context menu |
Fires event busyStateChanged to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
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. |
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 |
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. |
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. |
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 |
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. |
Fires event customFilter to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
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. |
Fires event firstVisibleRowChanged to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
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. |
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. |
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. |
Fires event rowsUpdated to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
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 |
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
.
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
Get the binding object for a specific aggregation/property.
Param | Type | DefaultValue | Description |
---|---|---|---|
sName | string | "rows" |
Name of the property or aggregation |
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 |
|
iColumnIndex | int |
Index of column in the list of visible columns or in the |
|
bVisibleColumnIndex | boolean |
If set to |
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.
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
.
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.
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. |
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.
Gets content of aggregation dragDropConfig
which defines the drag-and-drop configuration.
The following restrictions apply:
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
.
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
.
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
.
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
.
Gets current value of property enableColumnReordering.
Flag to enable or disable column reordering
Default value is true
.
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
.
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
.
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
.
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.
Gets current value of property firstVisibleRow.
First visible row.
Default value is 0
.
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
.
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
.
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
.
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
.
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.
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:
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
.
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.
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.
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.
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.
Retrieves the lead selection index.
Zero-based indices of selected items, wrapped in an array. An empty array means "no selection".
Gets current value of property selectionBehavior.
Selection behavior of the Table. This property defines whether the row selector is displayed and whether the row, the row selector or both can be clicked to select a row. 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
.
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
.
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
.
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
.
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
.
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:
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
.
Gets content of aggregation title.
Control or text of title section of the Table (if not set it will be hidden)
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.
Gets current value of property visibleRowCount.
Number of visible rows of the table.
Default value is 10
.
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.
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
.
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Checks whether an index is selected.
Param | Type | DefaultValue | Description |
---|---|---|---|
iIndex | int |
Index to check for selection |
Removes all the controls from the aggregation columns.
Additionally, it unregisters them from the hosting UIArea.
Removes all the controls from the aggregation extension.
Additionally, it unregisters them from the hosting UIArea.
Removes all the controls from the aggregation plugins.
Additionally, it unregisters them from the hosting UIArea.
Removes all the controls from the aggregation rows.
Additionally, it unregisters them from the hosting UIArea.
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 |
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 |
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 |
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 |
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 |
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 |
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.
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 |
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 |
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 |
Sets the aggregated contextMenu.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContextMenu | sap.ui.core.IContextMenu |
The contextMenu to set |
Sets the creation row.
Param | Type | DefaultValue | Description |
---|---|---|---|
oCreationRow | sap.ui.table.CreationRow |
Instance of the creation row |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Sets the aggregated noData.
Param | Type | DefaultValue | Description |
---|---|---|---|
vNoData | sap.ui.core.Control string |
The noData to set |
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 |
Sets the aggregated rowActionTemplate.
Param | Type | DefaultValue | Description |
---|---|---|---|
oRowActionTemplate | sap.ui.table.RowAction |
The rowActionTemplate to set |
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 |
Sets the aggregated rowSettingsTemplate.
Param | Type | DefaultValue | Description |
---|---|---|---|
oRowSettingsTemplate | sap.ui.table.RowSettings |
The rowSettingsTemplate to set |
Sets the selected index. The previous selection is removed.
Param | Type | DefaultValue | Description |
---|---|---|---|
iIndex | int |
The index to select |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Sets the aggregated title.
Param | Type | DefaultValue | Description |
---|---|---|---|
vTitle | sap.ui.core.Control string |
The title to set |
Sets the aggregated toolbar.
Param | Type | DefaultValue | Description |
---|---|---|---|
oToolbar | sap.ui.core.Toolbar |
The toolbar to set |
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 |
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 |
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.
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 |
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 |
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 |