Results 1 to 6 of 6

Thread: gridPanel.applyState( coulmnData ) not working

  1. #1
    Sencha User
    Join Date
    Mar 2008
    Posts
    79

    Default gridPanel.applyState( coulmnData ) not working

    Hello there,

    I am using EXT JS 4.2 and using below code to display the column order as user saved it.
    Code:
    gridPanel.applyState( coulmnData )
    Sometime order of the columns not showing as user saved it even stateId is correct in table.
    any idea how to fix this ?

    Regards
    vik

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    Which specific version of Ext JS are you running? Have you seen this example?
    http://docs.sencha.com/extjs/4.1.1/#...rray-grid.html

    Did you set stateful to true in your grid config?

  3. #3
    Sencha User
    Join Date
    Mar 2008
    Posts
    79

    Default

    Hello Gary,
    thanks for reply, I have already tried 'statful:true' but not success.
    I m using "EXT JSVersion: "421883", version: "4.2.1.883"

    As i have already mentioned that i am getting columns order from database table.
    see if you can provide me more solutions to fix this issue.


    Code:
    gridPanel = Ext.create('Ext.grid.Panel', {
            header: false,
            anchor: '100% 100%',
            columnLines: true,
            plugins: [{ ptype: 'bufferedrenderer' }],
            store: store,
            loadMask: true,
            stateful:true,
            },....
    and i have added unique stateId in each column
    Code:
        stateId: 'statePosting',
    thanks & regards
    vik
    Last edited by Vikram; 22 Mar 2016 at 11:39 PM. Reason: adding more info

  4. #4
    Sencha User
    Join Date
    Mar 2008
    Posts
    79

    Default

    Hello Gary, Any updates on this ??
    Last edited by Vikram; 5 May 2016 at 3:17 AM. Reason: rectify name

  5. #5
    Sencha User SurenderBhyan1's Avatar
    Join Date
    Nov 2013
    Location
    INDIA
    Posts
    130
    Answers
    7

    Default Any Help

    Facing the same issue in Ext JS 4.2.1.


    Steps:
    1. Load the display
    2. hide/unhide OR change some columns order by moving them.
    3. Close display ( Here I am saving displayState in Db on display close.)
    4. Load display again and used below code before render to apply the state saved in DB.


    myGrid.applyState(colDataWithState);


    -- colDataWithState is coming from DataBase.


    Interesting this is that if I put console like
    console.log(colDataWithState)


    myGrid.applyState(colDataWithState);


    Here console show me the exact order that i saved in DB, but after applyState, column ordered is not as per view saved.


    I am using the stateful: true and unique stateId fopr each column, Also grid have some Action column too.

    Any help will be appricated
    ---A ship in the harbor is safe, but that is not what the ships are made for...

  6. #6
    Sencha User SurenderBhyan1's Avatar
    Join Date
    Nov 2013
    Location
    INDIA
    Posts
    130
    Answers
    7
    ---A ship in the harbor is safe, but that is not what the ships are made for...

Similar Threads

  1. Replies: 7
    Last Post: 29 Jan 2016, 7:54 AM
  2. [CLOSED] Showing columns (hidden by default) via grid.applyState isn't working
    By serendipitic in forum Ext 5: Bugs
    Replies: 4
    Last Post: 8 Jul 2015, 4:10 AM
  3. [FIXED] GridPanel.applyState() wipes out sortable property in ColumnModel
    By sumit.madan in forum Ext 3.x: Bugs
    Replies: 4
    Last Post: 28 Feb 2012, 11:38 AM
  4. Replies: 2
    Last Post: 16 Feb 2011, 1:09 PM
  5. Replies: 0
    Last Post: 14 Sep 2010, 10:25 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •