on 03-11-2020 6:56 AM
Experts,
Created Server model for table display. Initial load looks good and it has got 1000+ rows.
Now requirement is to Filter and Sort loaded data. Since Filtering and Sorting need to be done within table any possibilities to avoid Odata call to back end? So basically within Client since getModel() got data i think if Filtering and sorting will improve performance of App....
Since it's BW query running in background oData call anywhere takes 20 seconds and more.
Any thoughts?
I did like this...But not working...
oTable.getBinding("items").sOperationMode = "Client";
Hi,
Take a look at this example:
Samples - Grid Table - Sorting
The sample uses JSONModel for table items, no request to server will be made.
Retrieved data from ODataModel can be set to JSONModel with setData() method.
Regards,
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try setting useclientmode to true.
oTable.getBinding("items").useClientMode = true;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am using Responsive Table since requirement involves Mobile Interface as well. I will check on Sorting in Grid Table...
Also i have a new issue...can you please help here
https://answers.sap.com/questions/13002442/jsonmodel-how-to-identify-changes-done-to-table.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes....init also...
But my requirement was different...Based on action table should reload...Anyways in init as well as i do have JSON binding from OData.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try download the sample from Samples - Grid Table - Sorting, and modify the data part. I'm sure it works, maybe there is some typo in your code what we cannot see without the complete code.
Declare oModel as Odata Model...Read from Backend using Read Function.
In Success function, bind oData received to JSON Model. setData{ zmrktseg: oData-results }
Then bind JSONModel to View.
this.getView().setModel(oJSONModel)...Here you go..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.