Quantcast
Channel: SCN: Message List - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 8124

ui5 table - Formatting Dynamic Columns

$
0
0

Hi, i am just getting to SAPUI5 arena and started building a new UI5 app. I have a table control and dynamically assigning the values from the oData. When i try to format the date, numbers or alignment in the columns, they won't do. I have tried various options from the forums etc. but nothing seemed to help. I know i am wrong somewhere but not sure where.

 

1) Ex: Date format: The type that i put in fails with undefined error. If i format it as the number it tries to format it. The underlying datatype from oData is Datetime.

            new sap.ui.table.Column("colDtReq", {
                label: new sap.ui.commons.Label({text: "Date of Request", wrapping: true}),
                template: new sap.ui.commons.TextView({
                    text: {
                        path: "Erdat"
                        type: new sap.ui.model.type.DateTime({pattern: "MM/dd/yyyy hh:mm"})
                    },
                    editable: false
                    }),
                sortProperty: "Erdat",
                filterProperty: "{Erdat}"

 

Thanks


Viewing all articles
Browse latest Browse all 8124

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>