1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    107
    Vote Rating
    -1
    Answers
    4
    sencha.user is an unknown quantity at this point

      0  

    Default Answered: Reset/clear grid completely

    Answered: Reset/clear grid completely


    Hi,

    How do we reset a grid completely? I tried,

    Code:
    Ext.getCmp('grid_id').getStore().removeAll();
    It doesn't remove column header in the grid. Is there any other way?

    Thanks in advance!

  2. I did it myself hyding the whole grid when not necessary,

    Code:
    Ext.get('grid_id').hide();

  3. #2
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,099
    Vote Rating
    96
    Answers
    113
    Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light

      1  

    Default


    depends on what you mean by reset and what you want to do with it after reset. the reconfigure method of the grid might do the work for you:

    http://docs.sencha.com/ext-js/4-0/#!...od-reconfigure

    you can pass no store and an empty columns array. the title and other configs of the grid would remain as it is i would guess.

  4. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    107
    Vote Rating
    -1
    Answers
    4
    sencha.user is an unknown quantity at this point

      0  

    Default


    I did it myself hyding the whole grid when not necessary,

    Code:
    Ext.get('grid_id').hide();

  5. #4
    Sencha User
    Join Date
    Jul 2012
    Posts
    107
    Vote Rating
    -1
    Answers
    4
    sencha.user is an unknown quantity at this point

      0  

    Default


    Hi Farish,

    I tried that, since the columns are set initially in run time, column headers are not getting removed. Thanks for your input .

Thread Participants: 1