Hello colleagues,
please advise.
I'm trying to have a simple sorting by column value.
1. The table is created like this:
var oTable = new sap.ui.table.Table({ id: "Overview", title : "Table1", });
2. Then I add a column:
oTable.addColumn(new sap.ui.table.Column({ label : new sap.ui.commons.Label({text : "Column1"}), template : new sap.ui.commons.TextView().bindProperty("text","SENDER_NAME"), sortProperty : "SENDER_NAME", filterProperty : "SENDER_NAME", }));
3. Assign oData model:
oTable.setModel(oController.oModel);
4. Create Sorter:
var sort1 = new sap.ui.model.Sorter("P8_TOTAL");
5.Bind rows of Model to oTable
oTable.bindRows("/DASHBOARDSet",sort1);
6.Return table to View
return oTable;
Seems like piece a cake, but it is not working.
No idea why. I've read many threads here and couldn't make it work.
Appreciate your help.
Thank you.