SAPUI5 - Sorting NumericString in xml view
numericStringComparator: function(a, b) {
return (parseInt(a, 10) || 0) - (parseInt(b, 10) || 0);
}
In your xml view : Binding with items in sap.m.Table
<Table
id="idMyTable"
inset="false"
items="{
path: '/Items', // Your Collection
sorter: {
path: 'ItemNo', // Your string property name
comparator: '.numericStringComparator'
}
}"
updateFinished="onMyableUpdateFinished"
>