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

Re: How to sort numbers in SAPUI5?

$
0
0

var id_sort=new sap.ui.model.Sorter("EmpNum");

 

 

 

id_sort.fnCompare = function(a, b){

  var intA = parseInt(a), intB = parseInt(b);

 

  if (a == b) {

  return 0;

  }

  if (a < b) {

  return -1;

  }

  if (a > b) {

  return 1;

  }

  return 0;

};


Viewing all articles
Browse latest Browse all 3354

Trending Articles