Persist column order in grid, during current session as well as in later sessions

  1. #1

    Persist column order in grid, during current session as well as in later sessions

    I see that there is a StateProvider="LocalStorage" attribute that can be added to the ResourceManager, this would amaze and delight my users if I could get it working to preserve the order of columns that they have arranged. Currently it always goes back to the "standard" order of columns we have hard-coded.

    Once you have set this attribute in ResourceManager, how would you make sure it is saved whenever they make a change of column order? And then how to restore that column order the next time they open our web page? Also they use the Locked column feature, I would love to restore this.

    If I could get this ability to persist the column order, I would be a super-hero!

    Thanks in advance,

    Bob Graham
  2. #2
    Hello Bob!

    You are probably doing something wrong, please provide a test case how you are trying to attain that.

    In general lines, you should set the component's Stateful="true", and probably give the component an unique StateID="myComponentStateUniqueID", and also use the StateProvide="YourStateMechanismHere", as you pointed.

    You may want to try using StateProvider="Cookie" to get it working how you want it to (as this won't require any server-side implementation to store the state); then try other methods as you get the hang of it.

    It should store columns' position, among other settings. Just tried with the GridPanel > ArrayGrid > Simple example and works fine at least as far as the column order maintaining is concerned.

    Hope this helps; if not, please let us know how you are trying (or need) to attain the component state's memory with a test case.
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. [CLOSED] Column order on grid panel store reorder?
    By CanopiusApplications in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Jul 03, 2015, 8:16 AM
  2. Replies: 2
    Last Post: Jan 13, 2014, 12:49 PM
  3. Replies: 1
    Last Post: Jul 27, 2011, 10:19 AM
  4. [CLOSED] How to change column order in the grid.
    By Etisbew in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 15, 2009, 4:48 AM
  5. Replies: 2
    Last Post: Apr 24, 2009, 6:07 PM

Posting Permissions