The sap.m.Column
allows to define column specific properties that will be applied when rendering the sap.m.Table
.
See section "Defining Column Width" in the documentation to understand how to define the width
property of the sap.m.Column
to render a sap.m.Table
control properly.
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.m.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 |
---|---|---|---|
autoPopinWidth | float | 8 | Defines the auto pop-in width for the column. If the |
demandPopin | boolean | false | According to your minScreenWidth settings, the column can be hidden in different screen sizes. Setting this property to true, shows this column as pop-in instead of hiding it. Note: This property gets overwritten if the |
hAlign | sap.ui.core.TextAlign | Begin | Defines the horizontal alignment of the column content. Note: Text controls with a |
importance | sap.ui.core.Priority | None | Defines the column importance. If the |
mergeDuplicates | boolean | false | Set Note: Merging only happens when rendering the |
mergeFunctionName | string | getText | Defines the control serialization function if |
minScreenWidth | string | Defines the minimum screen width to show or hide this column. By default column is always shown. The responsive behavior of the |
|
popinDisplay | sap.m.PopinDisplay | Block | Defines enumerated display options for the pop-in. |
popinHAlign | sap.ui.core.TextAlign | Begin | Horizontal alignment of the pop-in content. Available alignment settings are "Begin", "Center", "End", "Left", and "Right". Note: Controls with a text align do not inherit the horizontal alignment. Visibility: public |
sortIndicator | sap.ui.core.SortOrder | None | Defines if a column is sorted by setting the sort indicator for this column. Note: Defining this property does not trigger the sorting. |
styleClass | string | CSS class name for column contents(header, cells and footer of column). This property can be used for different column styling. If column is shown as pop-in then this class name is applied to related pop-in row. Visibility: public |
|
vAlign | sap.ui.core.VerticalAlign | Inherit | Defines the vertical alignment of the cells in a column. This property does not affect the vertical alignment of header and footer. Visibility: public |
visible | boolean | true | Specifies whether or not the column is visible. Invisible columns are not rendered. Visibility: public |
width | sap.ui.core.CSSSize | Defines the width of the column. If you leave it empty then this column covers the remaining space. Note: When setting |
Default Aggregation: header
Name | Cardinality | Type | Description |
---|---|---|---|
footer | 0..1 | sap.ui.core.Control |
Control to be displayed in the column footer. |
header (default) | 0..1 | sap.ui.core.Control |
Control to be displayed in the column header. |
Method | Description |
---|---|
clearLastValue |
Clears the last value of the column if mergeDuplicates property is true |
destroyFooter |
Destroys the footer in the aggregation footer. |
destroyHeader |
Destroys the header in the aggregation header. |
sap.m.Column.extend |
Creates a new subclass of class sap.m.Column with name
|
getAutoPopinWidth |
Gets current value of property autoPopinWidth. Defines the auto pop-in width for the column. If the Default value is |
getCssAlign |
Returns CSS alignment according to column hAlign setting or given parameter for Begin/End values checks the locale settings |
getDemandPopin |
Gets current value of property demandPopin. According to your minScreenWidth settings, the column can be hidden in different screen sizes. Setting this property to true, shows this column as pop-in instead of hiding it. Note: This property gets overwritten if the Default value is |
getFooter |
Gets content of aggregation footer. Control to be displayed in the column footer. |
getHAlign |
Gets current value of property hAlign. Defines the horizontal alignment of the column content. Note: Text controls with a Default value is |
getHeader |
Gets content of aggregation header. Control to be displayed in the column header. |
getImportance |
Gets current value of property importance. Defines the column importance. If the Default value is |
getIndex |
Gets the rendering index of the column |
getInitialOrder |
Gets the initial order of the column |
getLastValue |
Gets the last value of the column |
getMergeDuplicates |
Gets current value of property mergeDuplicates. Set Note: Merging only happens when rendering the Default value is |
getMergeFunctionName |
Gets current value of property mergeFunctionName. Defines the control serialization function if Default value is |
sap.m.Column.getMetadata |
Returns a metadata object for class sap.m.Column. |
getMinScreenWidth |
Gets current value of property minScreenWidth. Defines the minimum screen width to show or hide this column. By default column is always shown. The responsive behavior of the |
getOrder |
Gets the order of the column |
getPopinDisplay |
Gets current value of property popinDisplay. Defines enumerated display options for the pop-in. Default value is |
getPopinHAlign |
Gets current value of property popinHAlign. Horizontal alignment of the pop-in content. Available alignment settings are "Begin", "Center", "End", "Left", and "Right". Note: Controls with a text align do not inherit the horizontal alignment. Default value is
Since 1.14 Use popinDisplay property instead.
|
getSortIndicator |
Gets current value of property sortIndicator. Defines if a column is sorted by setting the sort indicator for this column. Note: Defining this property does not trigger the sorting. Default value is |
getStyleClass |
Gets current value of property styleClass. CSS class name for column contents(header, cells and footer of column). This property can be used for different column styling. If column is shown as pop-in then this class name is applied to related pop-in row. |
getVAlign |
Gets current value of property vAlign. Defines the vertical alignment of the cells in a column. This property does not affect the vertical alignment of header and footer. Default value is |
getVisible |
Gets current value of property visible. Specifies whether or not the column is visible. Invisible columns are not rendered. Default value is |
getWidth |
Gets current value of property width. Defines the width of the column. If you leave it empty then this column covers the remaining space. Note: When setting |
isHidden |
Determines whether the column will be hidden via media queries or not |
isPopin |
Determines whether the column will be shown as pop-in or not |
onItemsRemoved |
Gets called from the Table when the all items are removed |
setAutoPopinWidth |
Sets a new value for property autoPopinWidth. Defines the auto pop-in width for the column. If the When called with a value of Default value is |
setDemandPopin |
Sets a new value for property demandPopin. According to your minScreenWidth settings, the column can be hidden in different screen sizes. Setting this property to true, shows this column as pop-in instead of hiding it. Note: This property gets overwritten if the When called with a value of Default value is |
setDisplay |
Display or hide the column from given table This does not set the visibility property of the column |
setFooter |
Sets the aggregated footer. |
setHAlign |
Sets a new value for property hAlign. Defines the horizontal alignment of the column content. Note: Text controls with a When called with a value of Default value is |
setHeader |
Sets the aggregated header. |
setImportance |
Sets a new value for property importance. Defines the column importance. If the When called with a value of Default value is |
setIndex |
Sets the visible column index Negative index values can be used to clear |
setInitialOrder |
Sets the initial order of the column |
setLastValue |
Sets the last value of the column if mergeDuplicates property is true |
setMergeDuplicates |
Sets a new value for property mergeDuplicates. Set Note: Merging only happens when rendering the When called with a value of Default value is |
setMergeFunctionName |
Sets a new value for property mergeFunctionName. Defines the control serialization function if When called with a value of Default value is |
setMinScreenWidth |
Sets a new value for property minScreenWidth. Defines the minimum screen width to show or hide this column. By default column is always shown. The responsive behavior of the When called with a value of |
setOrder |
Sets the order of the column Does not do the visual effect Table should be invalidate to re-render |
setPopinDisplay |
Sets a new value for property popinDisplay. Defines enumerated display options for the pop-in. When called with a value of Default value is |
setPopinHAlign |
Sets a new value for property popinHAlign. Horizontal alignment of the pop-in content. Available alignment settings are "Begin", "Center", "End", "Left", and "Right". Note: Controls with a text align do not inherit the horizontal alignment. When called with a value of Default value is
Since 1.14 Use popinDisplay property instead.
|
setSortIndicator |
Sets a new value for property sortIndicator. Defines if a column is sorted by setting the sort indicator for this column. Note: Defining this property does not trigger the sorting. When called with a value of Default value is |
setStyleClass |
Sets a new value for property styleClass. CSS class name for column contents(header, cells and footer of column). This property can be used for different column styling. If column is shown as pop-in then this class name is applied to related pop-in row. When called with a value of |
setVAlign |
Sets a new value for property vAlign. Defines the vertical alignment of the cells in a column. This property does not affect the vertical alignment of header and footer. When called with a value of Default value is |
setVisible |
Sets a new value for property visible. Specifies whether or not the column is visible. Invisible columns are not rendered. When called with a value of Default value is |
setWidth |
Sets a new value for property width. Defines the width of the column. If you leave it empty then this column covers the remaining space. Note: When setting When called with a value of |
Creates a new subclass of class sap.m.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 |
Gets current value of property autoPopinWidth.
Defines the auto pop-in width for the column.
If the sap.m.Table
control is configured with autoPopinMode=true
, then the autoPopinWidth
property is used to calculate the minScreenWidth
property of the column in case a fixed width is not set for the column. See sap.m.Column#getWidth and sap.m.Table#getAutoPopinMode. Note: A float value is set for the autoPopinWidth
property which is internally treated as a rem value.
Default value is 8
.
Returns CSS alignment according to column hAlign setting or given parameter for Begin/End values checks the locale settings
Param | Type | DefaultValue | Description |
---|---|---|---|
sAlign | string |
TextAlign enumeration |
Gets current value of property demandPopin.
According to your minScreenWidth settings, the column can be hidden in different screen sizes. Setting this property to true, shows this column as pop-in instead of hiding it. Note: This property gets overwritten if the sap.m.Table
control is configured with autoPopinMode=true
. See sap.m.Table#getAutoPopinMode
Default value is false
.
Gets current value of property hAlign.
Defines the horizontal alignment of the column content.
Note: Text controls with a textAlign
property inherits the horizontal alignment.
Default value is Begin
.
Gets current value of property importance.
Defines the column importance.
If the sap.m.Table
control is configured with autoPopinMode=true
, then the column importance is taken into consideration for calculating the minScreenWidth
property and for setting the demandPopin
property of the column. See sap.m.Table#getAutoPopinMode
Default value is "None"
.
Gets current value of property mergeDuplicates.
Set true
to merge repeating/duplicate cells into one cell block. See mergeFunctionName
property to customize.
Note: Merging only happens when rendering the sap.m.Table
control, subsequent changes on the cell or item do not have any effect on the merged state of the cells, therefore this feature should not be used together with two-way binding. This property is ignored if any column is configured to be shown as a pop-in. Merging is not supported if the items
aggregation of the sap.m.Table
control is bound to an OData V4 model.
Default value is false
.
Gets current value of property mergeFunctionName.
Defines the control serialization function if mergeDuplicates
property is set to true
. The control itself uses this function to compare values of two repeating cells. Default value "getText" is suitable for sap.m.Label
and sap.m.Text
controls but for the sap.ui.core.Icon
control "getSrc" function should be used to merge icons. Note: You can pass one string parameter to given function after "#" sign. e.g. "data#myparameter"
Default value is 'getText'
.
Gets current value of property minScreenWidth.
Defines the minimum screen width to show or hide this column. By default column is always shown. The responsive behavior of the sap.m.Table
is determined by this property. As an example by setting minScreenWidth
property to "40em" (or "640px" or "Tablet") shows this column on tablet (and desktop) but hides on mobile. As you can give specific CSS sizes (e.g: "480px" or "40em"), you can also use the sap.m.ScreenSize enumeration (e.g: "Phone", "Tablet", "Desktop", "Small", "Medium", "Large", ....). Please also see demandPopin
property for further responsive design options. Note: This property gets overwritten if the sap.m.Table
control is configured with autoPopinMode=true
. See sap.m.Table#getAutoPopinMode
Gets current value of property popinDisplay.
Defines enumerated display options for the pop-in.
Default value is Block
.
Gets current value of property popinHAlign.
Horizontal alignment of the pop-in content. Available alignment settings are "Begin", "Center", "End", "Left", and "Right".
Note: Controls with a text align do not inherit the horizontal alignment.
Default value is Begin
.
Gets current value of property sortIndicator.
Defines if a column is sorted by setting the sort indicator for this column.
Note: Defining this property does not trigger the sorting.
Default value is None
.
Gets current value of property styleClass.
CSS class name for column contents(header, cells and footer of column). This property can be used for different column styling. If column is shown as pop-in then this class name is applied to related pop-in row.
Gets current value of property vAlign.
Defines the vertical alignment of the cells in a column. This property does not affect the vertical alignment of header and footer.
Default value is Inherit
.
Gets current value of property visible.
Specifies whether or not the column is visible. Invisible columns are not rendered.
Default value is true
.
Gets current value of property width.
Defines the width of the column. If you leave it empty then this column covers the remaining space. Note: When setting autoPopinMode=true
on the table, the columns with a fixed width must either be in px, rem, or em as the table internally calculates the minScreenWidth
property for the column. If a column has a fixed width, then this width is used to calculate the minScreenWidth
for the autoPopinMode
. If a column has a flexible width, such as % or auto, the autoPopinWidth
property is used to calculate the minScreenWidth
.
Sets a new value for property autoPopinWidth.
Defines the auto pop-in width for the column.
If the sap.m.Table
control is configured with autoPopinMode=true
, then the autoPopinWidth
property is used to calculate the minScreenWidth
property of the column in case a fixed width is not set for the column. See sap.m.Column#getWidth and sap.m.Table#getAutoPopinMode. Note: A float value is set for the autoPopinWidth
property which is internally treated as a rem value.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 8
.
Param | Type | DefaultValue | Description |
---|---|---|---|
fAutoPopinWidth | float | 8 |
New value for property |
Sets a new value for property demandPopin.
According to your minScreenWidth settings, the column can be hidden in different screen sizes. Setting this property to true, shows this column as pop-in instead of hiding it. Note: This property gets overwritten if the sap.m.Table
control is configured with autoPopinMode=true
. See sap.m.Table#getAutoPopinMode
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 |
---|---|---|---|
bDemandPopin | boolean | false |
New value for property |
Display or hide the column from given table This does not set the visibility property of the column
Param | Type | DefaultValue | Description |
---|---|---|---|
oTableDomRef | Element |
Table DOM reference |
|
bDisplay | boolean |
whether visible or not |
Sets a new value for property hAlign.
Defines the horizontal alignment of the column content.
Note: Text controls with a textAlign
property inherits the horizontal alignment.
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.TextAlign | Begin |
New value for property |
Sets the aggregated header.
Param | Type | DefaultValue | Description |
---|---|---|---|
oHeader | sap.ui.core.Control |
The header to set |
Sets a new value for property importance.
Defines the column importance.
If the sap.m.Table
control is configured with autoPopinMode=true
, then the column importance is taken into consideration for calculating the minScreenWidth
property and for setting the demandPopin
property of the column. See sap.m.Table#getAutoPopinMode
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is "None"
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sImportance | sap.ui.core.Priority | "None" |
New value for property |
Sets the visible column index Negative index values can be used to clear
Param | Type | DefaultValue | Description |
---|---|---|---|
nIndex | int |
index of the visible column |
Sets the initial order of the column
Param | Type | DefaultValue | Description |
---|---|---|---|
nOrder | int |
initial order of the column |
Sets the last value of the column if mergeDuplicates property is true
Param | Type | DefaultValue | Description |
---|---|---|---|
value | any |
Any Value |
Sets a new value for property mergeDuplicates.
Set true
to merge repeating/duplicate cells into one cell block. See mergeFunctionName
property to customize.
Note: Merging only happens when rendering the sap.m.Table
control, subsequent changes on the cell or item do not have any effect on the merged state of the cells, therefore this feature should not be used together with two-way binding. This property is ignored if any column is configured to be shown as a pop-in. Merging is not supported if the items
aggregation of the sap.m.Table
control is bound to an OData V4 model.
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 |
---|---|---|---|
bMergeDuplicates | boolean | false |
New value for property |
Sets a new value for property mergeFunctionName.
Defines the control serialization function if mergeDuplicates
property is set to true
. The control itself uses this function to compare values of two repeating cells. Default value "getText" is suitable for sap.m.Label
and sap.m.Text
controls but for the sap.ui.core.Icon
control "getSrc" function should be used to merge icons. Note: You can pass one string parameter to given function after "#" sign. e.g. "data#myparameter"
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 'getText'
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sMergeFunctionName | string | 'getText' |
New value for property |
Sets a new value for property minScreenWidth.
Defines the minimum screen width to show or hide this column. By default column is always shown. The responsive behavior of the sap.m.Table
is determined by this property. As an example by setting minScreenWidth
property to "40em" (or "640px" or "Tablet") shows this column on tablet (and desktop) but hides on mobile. As you can give specific CSS sizes (e.g: "480px" or "40em"), you can also use the sap.m.ScreenSize enumeration (e.g: "Phone", "Tablet", "Desktop", "Small", "Medium", "Large", ....). Please also see demandPopin
property for further responsive design options. Note: This property gets overwritten if the sap.m.Table
control is configured with autoPopinMode=true
. See sap.m.Table#getAutoPopinMode
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sMinScreenWidth | string |
New value for property |
Sets the order of the column Does not do the visual effect Table should be invalidate to re-render
Param | Type | DefaultValue | Description |
---|---|---|---|
nOrder | int |
order of the column |
Sets a new value for property popinDisplay.
Defines enumerated display options for the pop-in.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Block
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sPopinDisplay | sap.m.PopinDisplay | Block |
New value for property |
Sets a new value for property popinHAlign.
Horizontal alignment of the pop-in content. Available alignment settings are "Begin", "Center", "End", "Left", and "Right".
Note: Controls with a text align do not inherit the horizontal alignment.
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 |
---|---|---|---|
sPopinHAlign | sap.ui.core.TextAlign | Begin |
New value for property |
Sets a new value for property sortIndicator.
Defines if a column is sorted by setting the sort indicator for this column.
Note: Defining this property does not trigger the sorting.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is None
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sSortIndicator | sap.ui.core.SortOrder | None |
New value for property |
Sets a new value for property styleClass.
CSS class name for column contents(header, cells and footer of column). This property can be used for different column styling. If column is shown as pop-in then this class name is applied to related pop-in row.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sStyleClass | string |
New value for property |
Sets a new value for property vAlign.
Defines the vertical alignment of the cells in a column. This property does not affect the vertical alignment of header and footer.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Inherit
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sVAlign | sap.ui.core.VerticalAlign | Inherit |
New value for property |
Sets a new value for property visible.
Specifies whether or not the column is visible. Invisible columns 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.
Defines the width of the column. If you leave it empty then this column covers the remaining space. Note: When setting autoPopinMode=true
on the table, the columns with a fixed width must either be in px, rem, or em as the table internally calculates the minScreenWidth
property for the column. If a column has a fixed width, then this width is used to calculate the minScreenWidth
for the autoPopinMode
. If a column has a flexible width, such as % or auto, the autoPopinWidth
property is used to calculate the minScreenWidth
.
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 |