Skip to Content
0
Jun 02, 2016 at 08:10 AM

Sorting of Numbers in XML View is not working

1354 Views

Hi,

Sorting of Numbers in my XML View is not working.

I have searched the forum and got to know that JSON treats all as characters.

Some post were referencing to use sap.ui.model.Sorter and fnCompare

My view is an XML view. How do I use this or is there any other solution?

Here is my XML Code for table column on which I want the sorting.



<Table:Column hAlign="Right" width="10em" sortProperty="Kwmeng" filterProperty="Kwmeng">
     <Table:label>
          <Label text="Order Quantity" />
     </Table:label>
     <Table:template>
          <Label text="{  path:'SalesModel>Kwmeng',type:'sap.ui.model.type.Float'}" /> 
     </Table:template>
</Table:Column>

Any help would be highly appreciated.

Regards,

Firoz.

Attachments

sortasc.png (7.8 kB)