The column allows you to define column specific properties that will be applied when rendering the table.
Constructor for a new Column.
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.Column(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 |
---|---|---|---|
autoResizable | boolean | false | Enables auto-resizing of the column on double clicking the resize bar. The width is determined on the widest currently displayed content. It does not consider rows which are currently not scrolled into view. Currently only implemented to work with the following controls: |
defaultFilterOperator | string | If this property is set, the default filter operator of the column is overridden. By default |
|
filterOperator | string | Filter operator to use when filtering this column. Visibility: public |
|
filterProperty | string | Specifies the binding property on which the column shall be filtered. Since the column template may have composite bindings, it's not possible to figure out on which binding property the filter shall be applied. Therefore the binding property for filtering must be specified. For example, if the first name and last name are displayed in the same column, only one of the two can be defined as A column menu entry for filtering can only be generated if the |
|
filterType | any | Type of filter. It is used to transform the search term into the specified type and should be the same as defined in the binding for the column template. Default value is |
|
filterValue | string | Specifies the value of the filter as string (will be converted into the proper data type). It is possible to provide a filterOperator as string, as shown here: > 50 < 100 >= 150 <= 200 = 250 != 300 *something ends with something* starts with *something* contains some..thing between 50..100 betweenVisibility: public |
|
filtered | boolean | false | Indicates if the column is filtered. This property only controls if a filter indicator is displayed in the column header - it does not trigger the filter function. The column can be filtered using sap.ui.table.Table#filter. Visibility: public |
flexible | boolean | true | If the table is wider than the sum of widths of the visible columns, the columns will be resized proportionally to their widths that were set originally. If set to false, the column will be displayed in the original width. If all columns are set to not be flexible, an extra "dummy" column will be created at the end of the table. Visibility: public |
grouped | boolean | false | Indicates if the column is grouped. Visibility: public |
hAlign | sap.ui.core.HorizontalAlign | Begin | Horizontal alignment of the column content. Controls with a text align do not inherit the horizontal alignment. You have to set the text align directly on the template. Visibility: public |
headerSpan | any | 1 | If this property is set, a span is applied for the header. When moving columns, all columns which are part of the header will be moved. The |
minWidth | int | 0 | Defines the minimum width of a column in pixels. This property only has an effect if the given column width is flexible, for example with width This property only influences the automatic behavior. If a user adjusts the column width manually, the column width can become smaller. Minimal column width is device-dependent, for example on desktop devices the column will not be smaller than 48px. |
name | string | The name of the column which is used for the text representation of this column, for example, in menus. If not set, the text from the multiLabels aggregation or the label aggregation (in that order) is used as a fallback option. |
|
resizable | boolean | true | If set to true, the column can be resized either using the resize bar (by mouse) or using the keyboard (SHIFT + Left/Right Arrow keys) Visibility: public |
showFilterMenuEntry | boolean | true | Defines if the filter menu entry is displayed |
showSortMenuEntry | boolean | true | Defines if the sort menu entries are displayed |
sortOrder | sap.ui.table.SortOrder | Ascending | This property indicates the sort direction (Ascending or Descending). The corresponding icon will be rendered if the property |
sortProperty | string | Specifies the binding property on which the column will sort. Since the column template may have composite bindings, it's not possible to figure out on which binding property the sort shall be applied. Therefore the binding property for sorting must be specified. For example, if the first name and last name are displayed in the same column, only one of the two can be defined as A column menu entry for sorting can only be generated if the |
|
sorted | boolean | false | Indicates if the column is sorted. This property only controls if a sort indicator is displayed in the column header - it does not trigger the sort function. The column can be sorted using sap.ui.table.Table#sort. Visibility: public |
visible | boolean | true | Invisible controls are not rendered. Visibility: public |
width | sap.ui.core.CSSSize | Width of the column in CSS units. Default value is Minimal column width is device-dependent, for example on desktop devices the column will not be smaller than 48px. This property can be changed by the user or by the application configuration/personalization. If a user adjusts the column width manually, the resulting value is always set in pixels. In addition, other columns with width |
Default Aggregation: label
Name | Cardinality | Type | Description |
---|---|---|---|
creationTemplate | 0..1 | sap.ui.core.Control | |
label (default) | 0..1 | sap.ui.core.Control |
Label of the column which is displayed in the column header. This aggregation is for the standard behavior, where you only want to display one single row header. If a string is supplied, a default label control will be created. Which control this is depends on the loaded libraries. |
menu | 0..1 | sap.ui.unified.Menu |
The menu used by the column. By default the sap.ui.table.ColumnMenu is used. Note: Applications must not use or change the default |
multiLabels | 0..n | sap.ui.core.Control |
Labels of the column which are displayed in the column header. Define a control for each header row in the table. Use this aggregation if you want to use multiple headers per column. |
template | 0..1 | sap.ui.core.Control |
Template (cell renderer) of this column. A template is decoupled from the column. Each time the template's properties or aggregations have been changed, the template has to be applied again via |
Event | Description |
---|---|
columnMenuOpen |
Fires before the column menu is opened. Listeners may prevent the default action of this event by calling the |
Fires before the column menu is opened.
Listeners may prevent the default action of this event by calling the preventDefault
method on the event object.
Since: 1.33.0.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
menu | sap.ui.unified.Menu |
Refence to the selected |
Method | Description |
---|---|
addMultiLabel |
Adds some multiLabel to the aggregation multiLabels. |
attachColumnMenuOpen |
Attaches event handler When called, the context of the event handler (its Fires before the column menu is opened. |
destroyCreationTemplate |
Destroys the creation template. |
destroyLabel |
Destroys the label in the aggregation label. |
destroyMenu |
Destroys the menu in the aggregation menu. |
destroyMultiLabels |
Destroys all the multiLabels in the aggregation multiLabels. |
destroyTemplate |
Destroys the template in the aggregation template. |
detachColumnMenuOpen |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.ui.table.Column.extend |
Creates a new subclass of class sap.ui.table.Column with name
|
fireColumnMenuOpen |
Fires event columnMenuOpen to attached listeners. Listeners may prevent the default action of this event by calling the |
getAutoResizable |
Gets current value of property autoResizable. Enables auto-resizing of the column on double clicking the resize bar. The width is determined on the widest currently displayed content. It does not consider rows which are currently not scrolled into view. Currently only implemented to work with the following controls: Default value is |
getCreationTemplate |
Gets the creation template. |
getDefaultFilterOperator |
Gets current value of property defaultFilterOperator. If this property is set, the default filter operator of the column is overridden. By default |
getFiltered |
Gets current value of property filtered. Indicates if the column is filtered. This property only controls if a filter indicator is displayed in the column header - it does not trigger the filter function. The column can be filtered using sap.ui.table.Table#filter. Default value is |
getFilterOperator |
Gets current value of property filterOperator. Filter operator to use when filtering this column. |
getFilterProperty |
Gets current value of property filterProperty. Specifies the binding property on which the column shall be filtered. Since the column template may have composite bindings, it's not possible to figure out on which binding property the filter shall be applied. Therefore the binding property for filtering must be specified. For example, if the first name and last name are displayed in the same column, only one of the two can be defined as A column menu entry for filtering can only be generated if the |
getFilterType |
Gets current value of property filterType. Type of filter. It is used to transform the search term into the specified type and should be the same as defined in the binding for the column template. Default value is |
getFilterValue |
Gets current value of property filterValue. Specifies the value of the filter as string (will be converted into the proper data type). It is possible to provide a filterOperator as string, as shown here: > 50 < 100 >= 150 <= 200 = 250 != 300 something ends with something* starts with something* contains some..thing between 50..100 between |
getFlexible |
Gets current value of property flexible. If the table is wider than the sum of widths of the visible columns, the columns will be resized proportionally to their widths that were set originally. If set to false, the column will be displayed in the original width. If all columns are set to not be flexible, an extra "dummy" column will be created at the end of the table. Default value is
Since 1.44 this property has no effect. Use the property <code>minWidth</code> in combination with the property <code>width="auto"</code> instead.
|
getGrouped |
Gets current value of property grouped. Indicates if the column is grouped. Default value is |
getHAlign |
Gets current value of property hAlign. Horizontal alignment of the column content. Controls with a text align do not inherit the horizontal alignment. You have to set the text align directly on the template. Default value is |
getHeaderSpan |
Gets current value of property headerSpan. If this property is set, a span is applied for the header. When moving columns, all columns which are part of the header will be moved. The Default value is |
getLabel |
Gets content of aggregation label. Label of the column which is displayed in the column header. This aggregation is for the standard behavior, where you only want to display one single row header. If a string is supplied, a default label control will be created. Which control this is depends on the loaded libraries. |
getMenu |
Gets content of aggregation menu. The menu used by the column. By default the sap.ui.table.ColumnMenu is used. Note: Applications must not use or change the default |
sap.ui.table.Column.getMetadata |
Returns a metadata object for class sap.ui.table.Column. |
getMinWidth |
Gets current value of property minWidth. Defines the minimum width of a column in pixels. This property only has an effect if the given column width is flexible, for example with width This property only influences the automatic behavior. If a user adjusts the column width manually, the column width can become smaller. Minimal column width is device-dependent, for example on desktop devices the column will not be smaller than 48px. Default value is |
getMultiLabels |
Gets content of aggregation multiLabels. Labels of the column which are displayed in the column header. Define a control for each header row in the table. Use this aggregation if you want to use multiple headers per column. |
getName |
Gets current value of property name. The name of the column which is used for the text representation of this column, for example, in menus. If not set, the text from the multiLabels aggregation or the label aggregation (in that order) is used as a fallback option. |
getResizable |
Gets current value of property resizable. If set to true, the column can be resized either using the resize bar (by mouse) or using the keyboard (SHIFT + Left/Right Arrow keys) Default value is |
getShowFilterMenuEntry |
Gets current value of property showFilterMenuEntry. Defines if the filter menu entry is displayed Default value is |
getShowSortMenuEntry |
Gets current value of property showSortMenuEntry. Defines if the sort menu entries are displayed Default value is |
getSorted |
Gets current value of property sorted. Indicates if the column is sorted. This property only controls if a sort indicator is displayed in the column header - it does not trigger the sort function. The column can be sorted using sap.ui.table.Table#sort. Default value is |
getSortOrder |
Gets current value of property sortOrder. This property indicates the sort direction (Ascending or Descending). The corresponding icon will be rendered if the property Default value is |
getSortProperty |
Gets current value of property sortProperty. Specifies the binding property on which the column will sort. Since the column template may have composite bindings, it's not possible to figure out on which binding property the sort shall be applied. Therefore the binding property for sorting must be specified. For example, if the first name and last name are displayed in the same column, only one of the two can be defined as A column menu entry for sorting can only be generated if the |
getTemplate |
Gets content of aggregation template. Template (cell renderer) of this column. A template is decoupled from the column. Each time the template's properties or aggregations have been changed, the template has to be applied again via |
getTemplateClone |
Returns a template clone. It either finds an unused clone or clones a new one from the template. |
getVisible |
Gets current value of property visible. Invisible controls are not rendered. Default value is |
getWidth |
Gets current value of property width. Width of the column in CSS units. Default value is Minimal column width is device-dependent, for example on desktop devices the column will not be smaller than 48px. This property can be changed by the user or by the application configuration/personalization. If a user adjusts the column width manually, the resulting value is always set in pixels. In addition, other columns with width |
indexOfMultiLabel |
Checks for the provided |
insertMultiLabel |
Inserts a multiLabel into the aggregation multiLabels. |
removeAllMultiLabels |
Removes all the controls from the aggregation multiLabels. Additionally, it unregisters them from the hosting UIArea. |
removeMultiLabel |
Removes a multiLabel from the aggregation multiLabels. |
setAutoResizable |
Sets a new value for property autoResizable. Enables auto-resizing of the column on double clicking the resize bar. The width is determined on the widest currently displayed content. It does not consider rows which are currently not scrolled into view. Currently only implemented to work with the following controls: When called with a value of Default value is |
setCreationTemplate |
Sets the creation template. |
setDefaultFilterOperator |
Sets a new value for property defaultFilterOperator. If this property is set, the default filter operator of the column is overridden. By default When called with a value of |
setFiltered |
Sets a new value for property filtered. Indicates if the column is filtered. This property only controls if a filter indicator is displayed in the column header - it does not trigger the filter function. The column can be filtered using sap.ui.table.Table#filter. When called with a value of Default value is |
setFilterOperator |
Sets a new value for property filterOperator. Filter operator to use when filtering this column. When called with a value of |
setFilterProperty |
Sets a new value for property filterProperty. Specifies the binding property on which the column shall be filtered. Since the column template may have composite bindings, it's not possible to figure out on which binding property the filter shall be applied. Therefore the binding property for filtering must be specified. For example, if the first name and last name are displayed in the same column, only one of the two can be defined as A column menu entry for filtering can only be generated if the When called with a value of |
setFilterType |
The filter type can be the class name of a type, an expression similar to the binding syntax, or a function. A function receives the entered filter value as a parameter and should return the appropriate value for the filter expression. |
setFilterValue |
Sets a new value for property filterValue. Specifies the value of the filter as string (will be converted into the proper data type). It is possible to provide a filterOperator as string, as shown here: > 50 < 100 >= 150 <= 200 = 250 != 300 something ends with something* starts with something* contains some..thing between 50..100 between When called with a value of |
setFlexible |
Sets a new value for property flexible. If the table is wider than the sum of widths of the visible columns, the columns will be resized proportionally to their widths that were set originally. If set to false, the column will be displayed in the original width. If all columns are set to not be flexible, an extra "dummy" column will be created at the end of the table. When called with a value of Default value is
Since 1.44 this property has no effect. Use the property <code>minWidth</code> in combination with the property <code>width="auto"</code> instead.
|
setGrouped |
Sets a new value for property grouped. Indicates if the column is grouped. When called with a value of Default value is |
setHAlign |
Sets a new value for property hAlign. Horizontal alignment of the column content. Controls with a text align do not inherit the horizontal alignment. You have to set the text align directly on the template. When called with a value of Default value is |
setHeaderSpan |
Sets a new value for property headerSpan. If this property is set, a span is applied for the header. When moving columns, all columns which are part of the header will be moved. The When called with a value of Default value is |
setLabel |
Sets the aggregated label. |
setMenu |
Sets the aggregated menu. |
setMinWidth |
Sets a new value for property minWidth. Defines the minimum width of a column in pixels. This property only has an effect if the given column width is flexible, for example with width This property only influences the automatic behavior. If a user adjusts the column width manually, the column width can become smaller. Minimal column width is device-dependent, for example on desktop devices the column will not be smaller than 48px. When called with a value of Default value is |
setName |
Sets a new value for property name. The name of the column which is used for the text representation of this column, for example, in menus. If not set, the text from the multiLabels aggregation or the label aggregation (in that order) is used as a fallback option. When called with a value of |
setResizable |
Sets a new value for property resizable. If set to true, the column can be resized either using the resize bar (by mouse) or using the keyboard (SHIFT + Left/Right Arrow keys) When called with a value of Default value is |
setShowFilterMenuEntry |
Sets a new value for property showFilterMenuEntry. Defines if the filter menu entry is displayed When called with a value of Default value is |
setShowSortMenuEntry |
Sets a new value for property showSortMenuEntry. Defines if the sort menu entries are displayed When called with a value of Default value is |
setSorted |
Sets a new value for property sorted. Indicates if the column is sorted. This property only controls if a sort indicator is displayed in the column header - it does not trigger the sort function. The column can be sorted using sap.ui.table.Table#sort. When called with a value of Default value is |
setSortOrder |
Sets a new value for property sortOrder. This property indicates the sort direction (Ascending or Descending). The corresponding icon will be rendered if the property When called with a value of Default value is |
setSortProperty |
Sets a new value for property sortProperty. Specifies the binding property on which the column will sort. Since the column template may have composite bindings, it's not possible to figure out on which binding property the sort shall be applied. Therefore the binding property for sorting must be specified. For example, if the first name and last name are displayed in the same column, only one of the two can be defined as A column menu entry for sorting can only be generated if the When called with a value of |
setTemplate |
Sets the aggregated template. |
setVisible |
Sets a new value for property visible. Invisible controls are not rendered. When called with a value of Default value is |
setWidth |
Sets a new value for property width. Width of the column in CSS units. Default value is Minimal column width is device-dependent, for example on desktop devices the column will not be smaller than 48px. This property can be changed by the user or by the application configuration/personalization. If a user adjusts the column width manually, the resulting value is always set in pixels. In addition, other columns with width When called with a value of |
shouldRender |
Returns whether the column should be rendered. |
sort |
Sorts the current column ascending or descending.
Since 1.5.1 Please use the function "sap.ui.Table.prototype.sort".
|
toggleSort |
Toggles the sort order of the column.
Since 1.5.1 Please use the function "sap.ui.Table.prototype.sort".
|
Adds some multiLabel to the aggregation multiLabels.
Param | Type | DefaultValue | Description |
---|---|---|---|
oMultiLabel | sap.ui.core.Control |
The multiLabel to add; if empty, nothing is inserted |
Attaches event handler fnFunction
to the columnMenuOpen event of this sap.ui.table.Column
.
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.Column
itself.
Fires before the column menu is opened.
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 |
Detaches event handler fnFunction
from the columnMenuOpen event of this sap.ui.table.Column
.
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 subclass of class sap.ui.table.Column 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.Element.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 |
Fires event columnMenuOpen 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 |
|
menu | sap.ui.unified.Menu |
Refence to the selected |
Gets current value of property autoResizable.
Enables auto-resizing of the column on double clicking the resize bar. The width is determined on the widest currently displayed content. It does not consider rows which are currently not scrolled into view. Currently only implemented to work with the following controls: sap.m.Text, sap.m.Label, sap.m.Link, sap.m.Input, sap.ui.commons.TextView, sap.ui.commons.Label, sap.ui.commons.Link and sap.ui.commons.TextField, sap.ui.commons.Checkbox, sap.m.CheckBox
Default value is false
.
Gets current value of property defaultFilterOperator.
If this property is set, the default filter operator of the column is overridden. By default Contains
is used for string and EQ
for other types. A valid sap.ui.model.FilterOperator
needs to be passed.
Gets current value of property filtered.
Indicates if the column is filtered. This property only controls if a filter indicator is displayed in the column header - it does not trigger the filter function. The column can be filtered using sap.ui.table.Table#filter.
Default value is false
.
Gets current value of property filterOperator.
Filter operator to use when filtering this column.
Gets current value of property filterProperty.
Specifies the binding property on which the column shall be filtered. Since the column template may have composite bindings, it's not possible to figure out on which binding property the filter shall be applied. Therefore the binding property for filtering must be specified. For example, if the first name and last name are displayed in the same column, only one of the two can be defined as filterProperty
.
A column menu entry for filtering can only be generated if the filterProperty
is set. The default menu entry is a text input field.
Gets current value of property filterType.
Type of filter. It is used to transform the search term into the specified type and should be the same as defined in the binding for the column template. Default value is sap.ui.model.type.String
. It can be set to the class name of the type, e.g.: sap.ui.model.type.Date
, or an expression similar to the binding syntax, e.g.: "\{type: 'sap.ui.model.type.Date', formatOptions: \{UTC: true\}, constraints: \{\} \}"
. Here the escaping is mandatory to avoid handling by the binding parser. As an alternative, a function can be passed that takes over the conversion. This cannot be done in the XMLView, use #setFilterType instead.
Gets current value of property filterValue.
Specifies the value of the filter as string (will be converted into the proper data type). It is possible to provide a filterOperator as string, as shown here:
> 50 < 100 >= 150 <= 200 = 250 != 300 something ends with something* starts with something* contains some..thing between 50..100 between
Gets current value of property flexible.
If the table is wider than the sum of widths of the visible columns, the columns will be resized proportionally to their widths that were set originally. If set to false, the column will be displayed in the original width. If all columns are set to not be flexible, an extra "dummy" column will be created at the end of the table.
Default value is true
.
Gets current value of property grouped.
Indicates if the column is grouped.
Default value is false
.
Gets current value of property hAlign.
Horizontal alignment of the column content. Controls with a text align do not inherit the horizontal alignment. You have to set the text align directly on the template.
Default value is Begin
.
Gets current value of property headerSpan.
If this property is set, a span is applied for the header. When moving columns, all columns which are part of the header will be moved. The headerSpan
can be either an integer or an array of integers (if you use the multi header feature of the table). If you only specify an integer, this span is applied for all header rows, with multiple integers you can specify a separate span for each header row. Note: Only columns with a span equal to 1 can have a column menu. When setting a column to fixed, all columns which are part of the header with the greatest span will be set to fixed.
Default value is 1
.
Gets content of aggregation label.
Label of the column which is displayed in the column header. This aggregation is for the standard behavior, where you only want to display one single row header. If a string is supplied, a default label control will be created. Which control this is depends on the loaded libraries.
Gets content of aggregation menu.
The menu used by the column. By default the sap.ui.table.ColumnMenu is used.
Note: Applications must not use or change the default sap.ui.table.ColumnMenu
of a column in any way or create own instances of sap.ui.table.ColumnMenu
. To add a custom menu to a column, use the aggregation menu
with a new instance of sap.ui.unified.Menu
.
Gets current value of property minWidth.
Defines the minimum width of a column in pixels.
This property only has an effect if the given column width is flexible, for example with width auto
.
This property only influences the automatic behavior. If a user adjusts the column width manually, the column width can become smaller.
Minimal column width is device-dependent, for example on desktop devices the column will not be smaller than 48px.
Default value is 0
.
Gets content of aggregation multiLabels.
Labels of the column which are displayed in the column header. Define a control for each header row in the table. Use this aggregation if you want to use multiple headers per column.
Gets current value of property name.
The name of the column which is used for the text representation of this column, for example, in menus. If not set, the text from the multiLabels aggregation or the label aggregation (in that order) is used as a fallback option.
Gets current value of property resizable.
If set to true, the column can be resized either using the resize bar (by mouse) or using the keyboard (SHIFT + Left/Right Arrow keys)
Default value is true
.
Gets current value of property showFilterMenuEntry.
Defines if the filter menu entry is displayed
Default value is true
.
Gets current value of property showSortMenuEntry.
Defines if the sort menu entries are displayed
Default value is true
.
Gets current value of property sorted.
Indicates if the column is sorted. This property only controls if a sort indicator is displayed in the column header - it does not trigger the sort function. The column can be sorted using sap.ui.table.Table#sort.
Default value is false
.
Gets current value of property sortOrder.
This property indicates the sort direction (Ascending or Descending). The corresponding icon will be rendered if the property sorted
is true
Default value is Ascending
.
Gets current value of property sortProperty.
Specifies the binding property on which the column will sort. Since the column template may have composite bindings, it's not possible to figure out on which binding property the sort shall be applied. Therefore the binding property for sorting must be specified. For example, if the first name and last name are displayed in the same column, only one of the two can be defined as sortProperty
.
A column menu entry for sorting can only be generated if the sortProperty
is set.
Gets content of aggregation template.
Template (cell renderer) of this column. A template is decoupled from the column. Each time the template's properties or aggregations have been changed, the template has to be applied again via setTemplate
for the changes to take effect. If a string is defined, a default text control will be created with its text property bound to the value of the string. The default template depends on the libraries loaded. If there is no template, the column will not be rendered in the table. The set of supported controls is limited. See section "Tables: Which One Should I Choose?" in the documentation for more details. While it is technically possible to also use other controls, doing so might lead to issues with regards to scrolling, alignment, condensed mode, screen reader support, and keyboard support.
Returns a template clone. It either finds an unused clone or clones a new one from the template.
Param | Type | DefaultValue | Description |
---|---|---|---|
iIndex | int |
Index of the column in the columns aggregation of the table |
Gets current value of property visible.
Invisible controls are not rendered.
Default value is true
.
Gets current value of property width.
Width of the column in CSS units. Default value is auto
, see
Minimal column width is device-dependent, for example on desktop devices the column will not be smaller than 48px.
This property can be changed by the user or by the application configuration/personalization.
If a user adjusts the column width manually, the resulting value is always set in pixels. In addition, other columns with width auto
get a fixed minimum width and do not shrink after the resizing.
Checks for the provided sap.ui.core.Control
in the aggregation multiLabels. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oMultiLabel | sap.ui.core.Control |
The multiLabel whose index is looked for |
Inserts a multiLabel into the aggregation multiLabels.
Param | Type | DefaultValue | Description |
---|---|---|---|
oMultiLabel | sap.ui.core.Control |
The multiLabel to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Removes all the controls from the aggregation multiLabels.
Additionally, it unregisters them from the hosting UIArea.
Removes a multiLabel from the aggregation multiLabels.
Param | Type | DefaultValue | Description |
---|---|---|---|
vMultiLabel | int string sap.ui.core.Control |
The multiLabel to remove or its index or id |
Sets a new value for property autoResizable.
Enables auto-resizing of the column on double clicking the resize bar. The width is determined on the widest currently displayed content. It does not consider rows which are currently not scrolled into view. Currently only implemented to work with the following controls: sap.m.Text, sap.m.Label, sap.m.Link, sap.m.Input, sap.ui.commons.TextView, sap.ui.commons.Label, sap.ui.commons.Link and sap.ui.commons.TextField, sap.ui.commons.Checkbox, sap.m.CheckBox
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 |
---|---|---|---|
bAutoResizable | boolean | false |
New value for property |
Sets the creation template.
Param | Type | DefaultValue | Description |
---|---|---|---|
oCreationTemplate | sap.ui.core.Control |
Instance of the creation template control |
Sets a new value for property defaultFilterOperator.
If this property is set, the default filter operator of the column is overridden. By default Contains
is used for string and EQ
for other types. A valid sap.ui.model.FilterOperator
needs to be passed.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sDefaultFilterOperator | string |
New value for property |
Sets a new value for property filtered.
Indicates if the column is filtered. This property only controls if a filter indicator is displayed in the column header - it does not trigger the filter function. The column can be filtered using sap.ui.table.Table#filter.
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 |
---|---|---|---|
bFiltered | boolean | false |
New value for property |
Sets a new value for property filterOperator.
Filter operator to use when filtering this column.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sFilterOperator | string |
New value for property |
Sets a new value for property filterProperty.
Specifies the binding property on which the column shall be filtered. Since the column template may have composite bindings, it's not possible to figure out on which binding property the filter shall be applied. Therefore the binding property for filtering must be specified. For example, if the first name and last name are displayed in the same column, only one of the two can be defined as filterProperty
.
A column menu entry for filtering can only be generated if the filterProperty
is set. The default menu entry is a text input field.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sFilterProperty | string |
New value for property |
The filter type can be the class name of a type, an expression similar to the binding syntax, or a function. A function receives the entered filter value as a parameter and should return the appropriate value for the filter expression.
Param | Type | DefaultValue | Description |
---|---|---|---|
vType | any |
The filter type |
Sets a new value for property filterValue.
Specifies the value of the filter as string (will be converted into the proper data type). It is possible to provide a filterOperator as string, as shown here:
> 50 < 100 >= 150 <= 200 = 250 != 300 something ends with something* starts with something* contains some..thing between 50..100 between
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sFilterValue | string |
New value for property |
Sets a new value for property flexible.
If the table is wider than the sum of widths of the visible columns, the columns will be resized proportionally to their widths that were set originally. If set to false, the column will be displayed in the original width. If all columns are set to not be flexible, an extra "dummy" column will be created at the end of the table.
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 |
---|---|---|---|
bFlexible | boolean | true |
New value for property |
Sets a new value for property grouped.
Indicates if the column is grouped.
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 |
---|---|---|---|
bGrouped | boolean | false |
New value for property |
Sets a new value for property hAlign.
Horizontal alignment of the column content. Controls with a text align do not inherit the horizontal alignment. You have to set the text align directly on the template.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Begin
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sHAlign | sap.ui.core.HorizontalAlign | Begin |
New value for property |
Sets a new value for property headerSpan.
If this property is set, a span is applied for the header. When moving columns, all columns which are part of the header will be moved. The headerSpan
can be either an integer or an array of integers (if you use the multi header feature of the table). If you only specify an integer, this span is applied for all header rows, with multiple integers you can specify a separate span for each header row. Note: Only columns with a span equal to 1 can have a column menu. When setting a column to fixed, all columns which are part of the header with the greatest span will be set to fixed.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 1
.
Param | Type | DefaultValue | Description |
---|---|---|---|
oHeaderSpan | any | 1 |
New value for property |
Sets the aggregated label.
Param | Type | DefaultValue | Description |
---|---|---|---|
vLabel | sap.ui.core.Control string |
The label to set |
Sets the aggregated menu.
Param | Type | DefaultValue | Description |
---|---|---|---|
oMenu | sap.ui.unified.Menu |
The menu to set |
Sets a new value for property minWidth.
Defines the minimum width of a column in pixels.
This property only has an effect if the given column width is flexible, for example with width auto
.
This property only influences the automatic behavior. If a user adjusts the column width manually, the column width can become smaller.
Minimal column width is device-dependent, for example on desktop devices the column will not be smaller than 48px.
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 |
---|---|---|---|
iMinWidth | int | 0 |
New value for property |
Sets a new value for property name.
The name of the column which is used for the text representation of this column, for example, in menus. If not set, the text from the multiLabels aggregation or the label aggregation (in that order) is used as a fallback option.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sName | string |
New value for property |
Sets a new value for property resizable.
If set to true, the column can be resized either using the resize bar (by mouse) or using the keyboard (SHIFT + Left/Right Arrow keys)
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 |
---|---|---|---|
bResizable | boolean | true |
New value for property |
Sets a new value for property showFilterMenuEntry.
Defines if the filter menu entry is displayed
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 |
---|---|---|---|
bShowFilterMenuEntry | boolean | true |
New value for property |
Sets a new value for property showSortMenuEntry.
Defines if the sort menu entries are displayed
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 |
---|---|---|---|
bShowSortMenuEntry | boolean | true |
New value for property |
Sets a new value for property sorted.
Indicates if the column is sorted. This property only controls if a sort indicator is displayed in the column header - it does not trigger the sort function. The column can be sorted using sap.ui.table.Table#sort.
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 |
---|---|---|---|
bSorted | boolean | false |
New value for property |
Sets a new value for property sortOrder.
This property indicates the sort direction (Ascending or Descending). The corresponding icon will be rendered if the property sorted
is true
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Ascending
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sSortOrder | sap.ui.table.SortOrder | Ascending |
New value for property |
Sets a new value for property sortProperty.
Specifies the binding property on which the column will sort. Since the column template may have composite bindings, it's not possible to figure out on which binding property the sort shall be applied. Therefore the binding property for sorting must be specified. For example, if the first name and last name are displayed in the same column, only one of the two can be defined as sortProperty
.
A column menu entry for sorting can only be generated if the sortProperty
is set.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sSortProperty | string |
New value for property |
Sets the aggregated template.
Param | Type | DefaultValue | Description |
---|---|---|---|
vTemplate | sap.ui.core.Control string |
The template to set |
Sets a new value for property visible.
Invisible controls are not rendered.
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 |
---|---|---|---|
bVisible | boolean | true |
New value for property |
Sets a new value for property width.
Width of the column in CSS units. Default value is auto
, see
Minimal column width is device-dependent, for example on desktop devices the column will not be smaller than 48px.
This property can be changed by the user or by the application configuration/personalization.
If a user adjusts the column width manually, the resulting value is always set in pixels. In addition, other columns with width auto
get a fixed minimum width and do not shrink after the resizing.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sWidth | sap.ui.core.CSSSize |
New value for property |