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

Re: sortProperty Odata on client side

$
0
0

Hi,

Yes you are right - for client-side sorting/filtering, you should use a JSONModel. Instead of directly binding your table to an ODataModel, consider doing this :

 

Get the data into a JSONModel

Use ODataModel's read() method, and create a new JSONModel with the response

 

oModel.read("/Employees", {

     success : function(oResponse) {

          //Create a new JSONModel here and set it to your table.    

     }

});

 

Client-side filtering/sorting

Now that your table is bound to a JSONModel, and not ODataModel, filtering and sorting will not trigger a network request.

oTable.getBinding("items").sort(...);

 

Regards,

Pritin


Viewing all articles
Browse latest Browse all 8545

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>