[CLOSED] persisting the customized columns in Razor view

  1. #1

    [CLOSED] persisting the customized columns in Razor view

    Hi,

    We have a grid and users can move around the columns based on their preference.
    Can you advise that if there any way we can persist those info and reload based on the user login?

    Thanks,
    Last edited by Daniil; Jan 11, 2013 at 3:44 AM. Reason: [CLOSED]
  2. #2
    Hi @gets_gui,

    1. Save the columns state somewhere, for example, to a database using an AJAX request (DirectEvent or DirectMethod).

    You can send the columns state as a request parameter.

    You can do it when a user clicks some "Save" button. To get the columns state you can use the GridPanel's getState method.
    App.GridPanel1.getState()
    It returns something like:
    {
        "columns": [{
            "id": "Column1"
        }, {
            "id": "Column2",
            "width": 138
        }, {
            "id": "Column3"
        }]
    }
    Or handling the GridPanel's ColumnMove event.
    http://docs.sencha.com/ext-js/4-1/#!...ent-columnmove

    2. On view creation time send the state from the controller to the view and create the GridPanel columns accordingly.
  3. #3
    Great, will try it out.
    Thanks!

Similar Threads

  1. [CLOSED] MultiHeader for Razor view
    By gets_gui in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Jan 07, 2013, 8:09 PM
  2. MVC Razor – Dynamically generate view
    By Ishrath in forum 2.x Help
    Replies: 0
    Last Post: Oct 11, 2012, 3:54 AM
  3. [CLOSED] Calendar View in Razor
    By MTSI in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Jul 05, 2012, 9:04 AM
  4. [CLOSED] [Razor] Using Model in MVC View
    By UnifyEducation in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: May 02, 2012, 4:38 PM
  5. Replies: 2
    Last Post: Jan 16, 2012, 9:53 AM

Tags for this Thread

Posting Permissions