on 11-19-2019 3:01 AM
Hi,
enableColumnReordering="true" works fine.
I am able to reorder the columns and they stay intact when I navigate between views. But when I refresh the page, the reordered sequence of the columns is lost and they are position back to normal. May I know how to have the columns re-ordered stay in their position even after page refresh ?
Here I am referring to sap.ui.table.
Thanks.
I understand theoretically how it works or how it should work, but looking for some high level direction from coding aspect.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You have to use both way or defining at controller only.
when I say both,
1) Define in xmlview and it will any how instantiated before controllers init method triggers, so you can put a if condition that if local storage contains value, then refer to controller's(your defined table columns with reference to local storage)
else let it go naturally via view definition.
What do you say 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Re-Order refers to columns, When ever user reorders columns by drag and drop, check if you have any event which gets triggered on rearrange, and store the values in local storage.
Now, when your refreshes complete page , first check if data is available in local storage, if available write a code to arrange in the way, else let it go default.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You have to store the reorder data in browsers local storage or cache or applications of browser
then when you refresh it,before table renders on the page check if their is any data in local storage if there then rearrange accordingly.
Above logic you can write in onInit method as you are refeshing whole page.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.