on 08-07-2020 11:56 AM
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.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.