Skip to content

DataTableColumn


When assigning a rule to a property of DataTableColumn, the rule will be passed an instance of the following proxy class as an argument:


DataTableColumn Properties

Property Type Required Default
DisplayType enum No "Text"
EditType enum No "Text"
Image Image No
ListPicker DataTableListPicker No
NumberOfLines integer No
OnValueChange ActionOrRule No
Style complex No
Styles object No
Text string No
TextAlignment enum No "Left"
Value complex No
_Name string No
_Type const No

DisplayType

Specify the style to display the value.

  • type: enum
  • default: "Text"

The value of this property must be one of the known values listed below.

DisplayType Known Values

Value Description
Text
Image

EditType

Specify the style to edit the value. This value is ignored if the display style is image.

  • type: enum
  • default: Text

The value of this property must be one of the known values listed below.

Value Description
Text The style to edit the value is Text type.
Date The style to edit the value is Date type.
Time The style to edit the value is Time type.
Duration The style to edit the value is Duration type.
List The style to edit the value is List type.
None The value is not editable.

Image

This property is deprecated. Please use the property Value instead.


ListPicker


NumberOfLines

On Android platform, if the property value is set to one or two, 1st and 2nd line of the content will be displayed respectively. But if the property value is more than 2, only the first two lines will be displayed irrespective of value assigned to the property and content length. In the instances where the property value is missing, only the first line of the content gets displayed. This property is not supported for header and only first line of the content gets displayed.

However, iOS platform restricts and displays the content based on the property value mentioned. If the value is set to 6, only 6 lines of content will be displayed, irrespective of the actual content length. In the instances where the property value is missing, the entire content gets displayed.

  • type: integer

OnValueChange

Action or rule to be executed after the value is changed. In iOS, this event is triggered when the user clicks on another item.


Style

This property is deprecated. Please use the property Styles instead. The string value is a style class name of Text or style class name of Image. For Image, the style is applicable only to SAP icon or font icon types (supported CSS properties are font-size, color, and background-color). Android doesn't support styling.

  • type: complex

Styles

Set styles for DataTableColumnItem. The style value is defined in the styling LESS file and this LESS file is defined in Styles property in Application.app in client metadata.

  • type: object with following properties.
Property Type Required Default
Text string No
Image string No
Date string No
Time string No
Duration string No
List string No

Text

The string value is a style class name. This style is applied to all columns (except Image type) when the DataTable is not in edit mode. It is also applied when column's EditType is "Text" or "None".

Image

The string value is a style class name. The CSS property background-color is supported for all image types while font-size and color are additionally supported for SAP icon and font icon types.

Date

The string value is a style class name. This style is applied for column's EditType of "Date" in edit mode.

Time

The string value is a style class name. This style is applied for column's EditType is "Time" in edit mode.

Duration

The string value is a style class name. This style is applied for column's EditType is "Duration" in edit mode.

List

The string value is a style class name. This style is applied for column's EditType is "List" in edit mode.


Text

This property is deprecated. Please use the property Value instead.

  • type: string

TextAlignment

For Android, only left and right are supported.

  • type: enum
  • default: "Left"

The value of this property must be one of the known values listed below.

TextAlignment Known Values

Value Description
Left
Right
Center

Value

  • type: complex

Value Value

Any following options needs to be fulfilled.

Option 1

Specify the value in yyyy-MM-dd or yyyy-MM-ddThh:mm:ss format for date, hh:mm:ss format for time & PT[hh]H[mm]M format for duration.

string

Option 2


_Name

  • type: string

_Type

  • type: const

The value of this property must be:

"DataTableRow.Type.Cell"