cancel
Showing results for 
Search instead for 
Did you mean: 

Number Formatting in ObjectListItem

Former Member
0 Kudos

Hi

Maybe a basic question from someone new...

I have create a List using ObjectListItem to present a Month with an associated value, the data coming from a JSON file.

<ObjectListItem

     title="{income>Month}"

     number="{income>Cost}"

     numberUnit="EUR"

     >

This works as expected, except that I don't seem to be able to format the Number.

How would I do that?

I am using XML Views (if that makes a difference).

Thanks

Al.

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

SAPUI5 SDK - Demo Kit

   number="{

   model : 'income',

   path : 'Cost',

   type: 'sap.ui.model.type.Integer', formatOptions: {groupingEnabled: true }

   }"

and of course dopnt forget to set binding syntax to complex if not done so

former_member182372
Active Contributor
0 Kudos

data-sap-ui-xx-bindingSyntax="complex"

in bootstrap

Former Member
0 Kudos

Fantastic. I have tried many different variations on this and no success.

Works now - thanks very much.

Former Member
0 Kudos

Is it possible to use the 'state' parameter into this as well, list I have seen in other list items?

In order to colour-code the number.

former_member182372
Active Contributor
0 Kudos

typing is generic for binding, any UI control property to any model property

Former Member
0 Kudos

Done it.

Answers (0)