Class sap.m.ColumnModule: sap/m/Column

extends Element

The sap.m.Column allows to define column specific properties that will be applied when rendering the sap.m.Table.


Since: 1.12.
Constructor Summary
new sap.m.Column(sId?, mSettings?)Constructor for a new Column.
Method Summary
sap.m.Column.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.Column with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.Column.getMetadata()Returns a metadata object for class sap.m.Column.
applyAlignTo(oControl, sAlign?)Apply text alignment of the Column to Text/Label/Link.
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.
getCssAlign(sAlign?)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.
getFooter()Gets content of aggregation footer.
getHAlign()Gets current value of property hAlign.
getHeader()Gets content of aggregation header.
getInitialOrder()Gets the initial order of the column
getLastValue()Gets the last value of the column
getMergeDuplicates()Gets current value of property mergeDuplicates.
getMergeFunctionName()Gets current value of property mergeFunctionName.
getMinScreenWidth()Gets current value of property minScreenWidth.
getOrder()Gets the order of the column
getPopinDisplay()Gets current value of property popinDisplay.
getStyleClass()Gets current value of property styleClass.
getVAlign()Gets current value of property vAlign.
getVisible()Gets current value of property visible.
getWidth()Gets current value of property width.
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
setDemandPopin(bDemandPopin)Sets a new value for property demandPopin.
setDisplay(oTableDomRef, bDisplay?)Display or hide the column from given table This does not set the visibility property of the column
setDisplayViaMedia(oTableDomRef)Display or hide the column from given table via checking media query changes
setFooter(oFooter)Sets the aggregated footer.
setHAlign(sHAlign)Sets a new value for property hAlign.
setHeader(oHeader)Sets the aggregated header.
setIndex(nIndex)Sets the visible column index Negative index values can be used to clear
setInitialOrder(nOrder)Sets the initial order of the column
setLastValue(value)Sets the last value of the column if mergeDuplicates property is true
setMergeDuplicates(bMergeDuplicates)Sets a new value for property mergeDuplicates.
setMergeFunctionName(sMergeFunctionName)Sets a new value for property mergeFunctionName.
setMinScreenWidth(sMinScreenWidth)Sets a new value for property minScreenWidth.
setOrder(nOrder)Sets the order of the column Does not do the visual effect Table should be invalidate to re-render
setPopinDisplay(sPopinDisplay)Sets a new value for property popinDisplay.
setStyleClass(sStyleClass)Sets a new value for property styleClass.
setVAlign(sVAlign)Sets a new value for property vAlign.
setVisible(bVisible)Sets a new value for property visible.
setWidth(sWidth)Sets a new value for property width.
getPopinHAlign()Gets current value of property popinHAlign.
setPopinHAlign(sPopinHAlign)Sets a new value for property popinHAlign.
Constructor Detail
new sap.m.Column(sId?, mSettings?)
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 for a general description of the syntax of the settings object.

The supported settings are:

In addition, all settings applicable to the base type sap.ui.core.Element can be used as well.

Parameters:
{string}sId? id for the new control, generated automatically if no id is given
{object}mSettings? initial settings for the new control
Method Detail
sap.m.Column.extend(sClassName, oClassInfo?, FNMetaImpl?): function
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.

Parameters:
{string}sClassName Name of the class being created
{object}oClassInfo? Object literal with information about the class
{function}FNMetaImpl? Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
{function} Created class / constructor function
sap.m.Column.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.Column.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
applyAlignTo(oControl, sAlign?): sap.ui.core.Control
Apply text alignment of the Column to Text/Label/Link...

TODO: This is so ugly to check content functions instead we should document how to use our controls to inherit text-alignment and we should add a new sap.ui.core.TextAlign type called "Inherit"

Parameters:
{sap.ui.core.Control}oControl List control
{String}sAlign? TextAlign enumeration
Returns:
{sap.ui.core.Control} oControl
clearLastValue(): sap.m.Column
Clears the last value of the column if mergeDuplicates property is true
Since:
1.20.4
Returns:
{sap.m.Column}
destroyFooter(): sap.m.Column
Destroys the footer in the aggregation footer.
Returns:
{sap.m.Column} Reference to this in order to allow method chaining
destroyHeader(): sap.m.Column
Destroys the header in the aggregation header.
Returns:
{sap.m.Column} Reference to this in order to allow method chaining
getCssAlign(sAlign?): String
Returns CSS alignment according to column hAlign setting or given parameter for Begin/End values checks the locale settings
Parameters:
{String}sAlign? TextAlign enumeration
Returns:
{String} left|center|right
getDemandPopin(): boolean
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.

Default value is false.

Returns:
{boolean} Value of property demandPopin
getFooter(): sap.ui.core.Control
Gets content of aggregation footer.

Control to be displayed in the column footer.

Returns:
{sap.ui.core.Control}
getHAlign(): sap.ui.core.TextAlign
Gets current value of property hAlign.

Horizontal alignment of the column content. Available alignment settings are "Begin", "Center", "End", "Left", and "Right".

NOTE: Control with a "textAlign" property inherits the horizontal alignment.

Default value is Begin.

Returns:
{sap.ui.core.TextAlign} Value of property hAlign
getHeader(): sap.ui.core.Control
Gets content of aggregation header.

Control to be displayed in the column header.

Returns:
{sap.ui.core.Control}
getInitialOrder(): int
Gets the initial order of the column
Returns:
{int} initial order of the column
getLastValue()
Gets the last value of the column
Since:
1.16
getMergeDuplicates(): boolean
Gets current value of property mergeDuplicates.

Set "true" to merge repeating cells(duplicates) into one cell block. Please see "mergeFunctionName" property to customize this property. Note: This feature must not be used together with two-way binding. This property is ignored if a column is shown in the pop-in.

Default value is false.

Since:
1.16
Returns:
{boolean} Value of property mergeDuplicates
getMergeFunctionName(): string
Gets current value of property mergeFunctionName.

Defines the value getter(serialization) function if "mergeDuplicates" property is set "true" Control itself uses this function to compare values of two repeating cells. Default value "getText" is suitable for Label and Text control. e.g. For "Icon" control "getSrc" can be used. Note: You can pass one string parameter to given function after "#" sign. e.g. "data#myparameter"

Default value is getText.

Since:
1.16
Returns:
{string} Value of property mergeFunctionName
getMinScreenWidth(): string
Gets current value of property minScreenWidth.

By default column is always shown. If you set this property, control checks the minimum width of the screen to show or hide this column. As you can give specific CSS sizes(e.g: "480px" or "40em"), you can also use sap.m.ScreenSize enumeration(e.g: "Phone", "Tablet", "Desktop", "Small", "Medium", "Large", ....).

sap.m.Column.MediaQuery1->Range1 = 199

This property can be used for responsive design. e.g: "40em"(or "640px" or "Tablet") setting shows this column in iPad(and Desktop) but hides in iPhone. Please also see "demandPopin" property

Returns:
{string} Value of property minScreenWidth
getOrder(): int
Gets the order of the column
Returns:
{int} nOrder order of the column
getPopinDisplay(): sap.m.PopinDisplay
Gets current value of property popinDisplay.

Defines enumerated display options for the pop-in.

Default value is Block.

Since:
1.13.2
Returns:
{sap.m.PopinDisplay} Value of property popinDisplay
getStyleClass(): string
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.

Returns:
{string} Value of property styleClass
Gets current value of property vAlign.

Vertical alignment of the cells in a column. Possible values are "Inherit", "Top", "Middle", "Bottom" This property does not affect the vertical alignment of header and footer.

Default value is Inherit.

Returns:
{sap.ui.core.VerticalAlign} Value of property vAlign
getVisible(): boolean
Gets current value of property visible.

Specifies whether or not the column is visible. Invisible columns are not rendered.

Default value is true.

Returns:
{boolean} Value of property visible
getWidth(): sap.ui.core.CSSSize
Gets current value of property width.

Defines the width of the column. If you leave it empty then this column covers the remaining space.

Returns:
{sap.ui.core.CSSSize} Value of property width
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
Since:
1.16
setDemandPopin(bDemandPopin): sap.m.Column
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.

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

Default value is false.

Parameters:
{boolean}bDemandPopin New value for property demandPopin
Returns:
{sap.m.Column} Reference to this in order to allow method chaining
setDisplay(oTableDomRef, bDisplay?)
Display or hide the column from given table This does not set the visibility property of the column
Parameters:
{Object}oTableDomRef Table DOM reference
{boolean}bDisplay? whether visible or not
setDisplayViaMedia(oTableDomRef)
Display or hide the column from given table via checking media query changes
Parameters:
{Object}oTableDomRef Table DOM reference
setFooter(oFooter): sap.m.Column
Sets the aggregated footer.
Parameters:
{sap.ui.core.Control}oFooter The footer to set
Returns:
{sap.m.Column} Reference to this in order to allow method chaining
setHAlign(sHAlign): sap.m.Column
Sets a new value for property hAlign.

Horizontal alignment of the column content. Available alignment settings are "Begin", "Center", "End", "Left", and "Right".

NOTE: Control 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.

Parameters:
{sap.ui.core.TextAlign}sHAlign New value for property hAlign
Returns:
{sap.m.Column} Reference to this in order to allow method chaining
setHeader(oHeader): sap.m.Column
Sets the aggregated header.
Parameters:
{sap.ui.core.Control}oHeader The header to set
Returns:
{sap.m.Column} Reference to this in order to allow method chaining
setIndex(nIndex)
Sets the visible column index Negative index values can be used to clear
Parameters:
{int}nIndex index of the visible column
setInitialOrder(nOrder)
Sets the initial order of the column
Parameters:
{int}nOrder initial order of the column
setLastValue(value): sap.m.Column
Sets the last value of the column if mergeDuplicates property is true
Parameters:
{any}value Any Value
Since:
1.16
Returns:
{sap.m.Column}
setMergeDuplicates(bMergeDuplicates): sap.m.Column
Sets a new value for property mergeDuplicates.

Set "true" to merge repeating cells(duplicates) into one cell block. Please see "mergeFunctionName" property to customize this property. Note: This feature must not be used together with two-way binding. This property is ignored if a column is shown in the pop-in.

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

Default value is false.

Parameters:
{boolean}bMergeDuplicates New value for property mergeDuplicates
Since:
1.16
Returns:
{sap.m.Column} Reference to this in order to allow method chaining
setMergeFunctionName(sMergeFunctionName): sap.m.Column
Sets a new value for property mergeFunctionName.

Defines the value getter(serialization) function if "mergeDuplicates" property is set "true" Control itself uses this function to compare values of two repeating cells. Default value "getText" is suitable for Label and Text control. e.g. For "Icon" control "getSrc" can be used. 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.

Parameters:
{string}sMergeFunctionName New value for property mergeFunctionName
Since:
1.16
Returns:
{sap.m.Column} Reference to this in order to allow method chaining
setMinScreenWidth(sMinScreenWidth): sap.m.Column
Sets a new value for property minScreenWidth.

By default column is always shown. If you set this property, control checks the minimum width of the screen to show or hide this column. As you can give specific CSS sizes(e.g: "480px" or "40em"), you can also use sap.m.ScreenSize enumeration(e.g: "Phone", "Tablet", "Desktop", "Small", "Medium", "Large", ....).

sap.m.Column.MediaQuery1->Range1 = 199

This property can be used for responsive design. e.g: "40em"(or "640px" or "Tablet") setting shows this column in iPad(and Desktop) but hides in iPhone. Please also see "demandPopin" property

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

Parameters:
{string}sMinScreenWidth New value for property minScreenWidth
Returns:
{sap.m.Column} Reference to this in order to allow method chaining
setOrder(nOrder)
Sets the order of the column Does not do the visual effect Table should be invalidate to re-render
Parameters:
{int}nOrder order of the column
setPopinDisplay(sPopinDisplay): sap.m.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.

Parameters:
{sap.m.PopinDisplay}sPopinDisplay New value for property popinDisplay
Since:
1.13.2
Returns:
{sap.m.Column} Reference to this in order to allow method chaining
setStyleClass(sStyleClass): sap.m.Column
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.

Parameters:
{string}sStyleClass New value for property styleClass
Returns:
{sap.m.Column} Reference to this in order to allow method chaining
setVAlign(sVAlign): sap.m.Column
Sets a new value for property vAlign.

Vertical alignment of the cells in a column. Possible values are "Inherit", "Top", "Middle", "Bottom" 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.

Parameters:
{sap.ui.core.VerticalAlign}sVAlign New value for property vAlign
Returns:
{sap.m.Column} Reference to this in order to allow method chaining
setVisible(bVisible): sap.m.Column
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.

Parameters:
{boolean}bVisible New value for property visible
Returns:
{sap.m.Column} Reference to this in order to allow method chaining
setWidth(sWidth): sap.m.Column
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.

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

Parameters:
{sap.ui.core.CSSSize}sWidth New value for property width
Returns:
{sap.m.Column} Reference to this in order to allow method chaining
getPopinHAlign(): sap.ui.core.TextAlign
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.

Deprecated:
Since version 1.14. Use popinDisplay property instead.
Returns:
{sap.ui.core.TextAlign} Value of property popinHAlign
setPopinHAlign(sPopinHAlign): sap.m.Column
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.

Parameters:
{sap.ui.core.TextAlign}sPopinHAlign New value for property popinHAlign
Deprecated:
Since version 1.14. Use popinDisplay property instead.
Returns:
{sap.m.Column} Reference to this in order to allow method chaining