cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 column not lining up correctly

former_member575294
Discoverer
0 Kudos

Hello ,

I have a table in sap.ui.table.Table structure. My columns are of type sap.ui.table.Column.

My problem:

Sorting is not correct in my columns with numeric values.

Columns with string data sort correctly.

The data in the column comes from Hybris data as JSON.

The structure I use for numerical columns:

oTable.addColumn(new sap.ui.table.Column({name:code,
label: new sap.ui.commons.Label({text: name,}),
template: new sap.m.ObjectNumber({textAlign: "Center",
number: {path: code,
type: "sap.ui.model.odata.type.Decimal",
formatOptions: {decimals: 3,
groupingEnabled: true,
groupingSeparator: ".",
decimalSeparator: ","} } }),
/*template: new sap.m.Text().bindProperty("text", { path:code, type: 'sap.ui.model.type.Integer' } ),*/sortProperty: code,
filterProperty: code,
width:"100px",
resizable: true,
}));
Column structure of string data:
oTable.addColumn(new sap.ui.table.Column({
    name:code,
    label: new sap.ui.commons.Label({text: name,}),
    template: new sap.ui.commons.TextView().bindProperty("text", code ),
    sortProperty: code,
    filterProperty: code,
    width:"100px",
    resizable: true,
}));









Thank you very much in advance.

Accepted Solutions (0)

Answers (0)