class sap.ui.table.AnalyticalColumn

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/table/AnalyticalColumn
Application Component: CA-UI5-TBL

This column adds additional properties to the table column which are needed for the analytical binding and table


Constructor

Constructor for a new AnalyticalColumn.

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.AnalyticalColumn(sId?, mSettings?)
Param Type Default Value Description
sId? string

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

mSettings? object

initial settings for the new control


Properties

Name Type Default Value Description
groupHeaderFormatter any

If the column is grouped, this formatter is used to format the value in the group header

Visibility: public
inResult boolean false

Specifies that the dimension referred to by the column shall be included in the granularity of the data result. It allows a finer distinction between a visible/grouped/(included)inResult column.

Visibility: public
leadingProperty string

Defines the primary model property which is used inside the Column. In case of the analytical extension this means the property which is grouped by for dimensions or the property which is summed for measures.

Visibility: public
showIfGrouped boolean false

Specifies whether the column is displayed within the table even if it is grouped or not. A grouped column has the same value for every rows within the group.

Visibility: public
summed boolean false

If defined a sum for this column is calculated

Visibility: public

Borrowed Properties

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: 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

Since: 1.21.1.

Visibility: public
defaultFilterOperator string

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.

Visibility: public
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 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.

Visibility: public
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 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.

Since: 1.9.2.

Visibility: public
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       between

Visibility: 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 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.

Visibility: public
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 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.

Since: 1.44.1.

Visibility: public
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.

Since: 1.11.1.

Visibility: public
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

Since: 1.13.0.

Visibility: public
showSortMenuEntry boolean true

Defines if the sort menu entries are displayed

Since: 1.13.0.

Visibility: public
sortOrder sap.ui.table.SortOrder Ascending

This property indicates the sort direction (Ascending or Descending). The corresponding icon will be rendered if the property sorted is true

Visibility: public
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 sortProperty.

A column menu entry for sorting can only be generated if the sortProperty is set.

Visibility: public
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 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.

Visibility: public

Borrowed Aggregations

Name Cardinality Type Description
label 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 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.

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.

Since: 1.13.1.

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


Methods Overview

Method Description
sap.ui.table.AnalyticalColumn.extend

Creates a new subclass of class sap.ui.table.AnalyticalColumn 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.table.Column.extend.

getGroupHeaderFormatter

Gets current value of property groupHeaderFormatter.

If the column is grouped, this formatter is used to format the value in the group header

getInResult

Gets current value of property inResult.

Specifies that the dimension referred to by the column shall be included in the granularity of the data result. It allows a finer distinction between a visible/grouped/(included)inResult column.

Default value is false.

getLeadingProperty

Gets current value of property leadingProperty.

Defines the primary model property which is used inside the Column. In case of the analytical extension this means the property which is grouped by for dimensions or the property which is summed for measures.

sap.ui.table.AnalyticalColumn.getMetadata

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

getShowIfGrouped

Gets current value of property showIfGrouped.

Specifies whether the column is displayed within the table even if it is grouped or not. A grouped column has the same value for every rows within the group.

Default value is false.

getSummed

Gets current value of property summed.

If defined a sum for this column is calculated

Default value is false.

isGroupable

Returns the information whether the column is groupable.

The column is groupable only if the following conditions are fulfilled:

  • The column must be child of an AnalyticalTable.
  • The rows aggregation of the table must be bound.
  • The metadata of the model must be loaded.
  • The column's leadingProperty must be a sortable and filterable dimension.

setGroupHeaderFormatter

Sets a new value for property groupHeaderFormatter.

If the column is grouped, this formatter is used to format the value in the group header

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

setInResult

Sets a new value for property inResult.

Specifies that the dimension referred to by the column shall be included in the granularity of the data result. It allows a finer distinction between a visible/grouped/(included)inResult column.

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

Default value is false.

setLeadingProperty

Sets a new value for property leadingProperty.

Defines the primary model property which is used inside the Column. In case of the analytical extension this means the property which is grouped by for dimensions or the property which is summed for measures.

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

setShowIfGrouped

Sets a new value for property showIfGrouped.

Specifies whether the column is displayed within the table even if it is grouped or not. A grouped column has the same value for every rows within the group.

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

Default value is false.

setSummed

Sets a new value for property summed.

If defined a sum for this column is calculated

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

Default value is false.

sap.ui.table.AnalyticalColumn.extend

Creates a new subclass of class sap.ui.table.AnalyticalColumn 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.table.Column.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

getGroupHeaderFormatter

Gets current value of property groupHeaderFormatter.

If the column is grouped, this formatter is used to format the value in the group header

getInResult

Gets current value of property inResult.

Specifies that the dimension referred to by the column shall be included in the granularity of the data result. It allows a finer distinction between a visible/grouped/(included)inResult column.

Default value is false.

getLeadingProperty

Gets current value of property leadingProperty.

Defines the primary model property which is used inside the Column. In case of the analytical extension this means the property which is grouped by for dimensions or the property which is summed for measures.

sap.ui.table.AnalyticalColumn.getMetadata

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

getShowIfGrouped

Gets current value of property showIfGrouped.

Specifies whether the column is displayed within the table even if it is grouped or not. A grouped column has the same value for every rows within the group.

Default value is false.

getSummed

Gets current value of property summed.

If defined a sum for this column is calculated

Default value is false.

isGroupable

Returns the information whether the column is groupable.

The column is groupable only if the following conditions are fulfilled:

setGroupHeaderFormatter

Sets a new value for property groupHeaderFormatter.

If the column is grouped, this formatter is used to format the value in the group header

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

Param Type DefaultValue Description
oGroupHeaderFormatter any

New value for property groupHeaderFormatter

setInResult

Sets a new value for property inResult.

Specifies that the dimension referred to by the column shall be included in the granularity of the data result. It allows a finer distinction between a visible/grouped/(included)inResult 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
bInResult boolean false

New value for property inResult

setLeadingProperty

Sets a new value for property leadingProperty.

Defines the primary model property which is used inside the Column. In case of the analytical extension this means the property which is grouped by for dimensions or the property which is summed for measures.

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

Param Type DefaultValue Description
sLeadingProperty string

New value for property leadingProperty

setShowIfGrouped

Sets a new value for property showIfGrouped.

Specifies whether the column is displayed within the table even if it is grouped or not. A grouped column has the same value for every rows within the group.

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
bShowIfGrouped boolean false

New value for property showIfGrouped

setSummed

Sets a new value for property summed.

If defined a sum for this column is calculated

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
bSummed boolean false

New value for property summed