on 2015 Mar 24 7:09 PM
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.
Request clarification before answering.
Alex, SAP just came up with client side sorting/filtering for OData model in 1.28:
The first steps towards client-side filtering/sorting on OData Model Data: the final implementation is planned for a later release, but a first experimentalversion is available in 1.28: by setting the “OperationMode" on a list binding to "Client", you can force the OData model to loadall data from the server and do sorting and filtering entirely in the browser, with no server roundtrip. Useful only when it is guaranteed that the count of data elements is low.
So, if you need client side sorting/filtering - use JsonModel as suggested before
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
54 | |
8 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.