[CLOSED] GridPanel, save and restore Collapsed state

  1. #1

    [CLOSED] GridPanel, save and restore Collapsed state

    Hi,

    how can I save the collapsed state of a gridpanel contained in a Viewport with Layout = "BorderLayout"?

    Thank you
  2. #2
    Hello @ADV!

    You can do that using state storing, normally via cookies, but there are also options to save using session, which can also be bound to data saved in a database (more complexity).

    Here's an example saving drag positions on items in cookies: Drag & Drop - Advanced - Drag with state.

    And here's a discussion on the topic about saving state on grid panels also: Saving state of application components.

    I hope this helps!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Thank you,

    i solved by

    <GetState Handler="var state = {}; state.LC = #{GridPanelLedgers}.collapsed; return state;" />
    <Listeners>
        <BeforeStateRestore Handler="#{GridPanelLedgers}.collapsed = state.LC;" />
    </Listeners>
    "state" is referred to its own gridpanel.

    How can i store in generic localstorage a text value, accessible from all pages?
  4. #4
    Hello @ADV!

    Glad you could solve the collapsed state, and thanks for sharing the solution that works for you!

    But I'm not sure what you mean with your following question

    How can i store in generic localstorage a text value, accessible from all pages?
    Not sure what to say but if the question is not really related to the initial question of this thread, would you mind creating a new thread? Regardless of that, can you make a test case illustrating what you want to store and elaborate on the generic localstorage term?
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. [CLOSED] Grid State Restore - Hidden Column
    By ecerrillos in forum 1.x Premium Help
    Replies: 11
    Last Post: Jul 11, 2014, 5:28 PM
  2. [CLOSED] State restore listener not fired ?
    By CarWise in forum 2.x Premium Help
    Replies: 4
    Last Post: May 10, 2013, 12:45 PM
  3. Replies: 2
    Last Post: Dec 07, 2011, 5:37 AM
  4. [CLOSED] Restore State?
    By Timothy in forum 1.x Premium Help
    Replies: 4
    Last Post: Dec 20, 2010, 2:58 PM
  5. Replies: 6
    Last Post: Jan 07, 2009, 9:31 AM

Posting Permissions