Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2823

Re: LocalStorage and sort

$
0
0

Hi Marius,


How you are pass your data to local storage?


If you want to sort an array/list. you can use .sort function.

 

for example:

var SORTKEY = "someSortKey";
  var DESCENDING = true;
  var GROUP = false;
  var oList = this.getView().byId("someList");
  var oBinding = oList.getBinding("items");
  var aSorter = [];
  // you may use foo.bar.CustomSorter instead:
  aSorter.push(new sap.ui.model.Sorter(SORTKEY, DESCENDING, GROUP));
  oBinding.sort(aSorter);


refer from: xml - How to set sorter of a List in Controller in SAPUI5? - Stack Overflow



Thanks,

Karthik A


Viewing all articles
Browse latest Browse all 2823

Trending Articles