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