Results 1 to 10 of 10

Thread: How to refresh or reload grid Header?

  1. #1
    Sencha Premium Member
    Join Date
    Apr 2013
    Posts
    55
    Vote Rating
    1
      0  

    Default How to refresh or reload grid Header?

    Hi

    I want to reload header again, as doLayout() does not serve my purpose.
    In extjs 3.4, I use gridView.refresh(),but what is alternate in Extjs 4.1.

    Thanks.

  2. #2
    Sencha - Documentation Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,162
    Answers
    501
    Vote Rating
    257
      0  

    Default

    What is it that you're looking to accomplish? Data has changed in the store / view and you're wanting to refresh the grid view?

    Or maybe grid.getView().refresh() or grid.updateLayout() or grid.getView().updateLayout() is what you're wanting?

  3. #3
    Sencha Premium Member
    Join Date
    Apr 2013
    Posts
    55
    Vote Rating
    1
      0  

    Default

    I has small panel where user will decide which column he wanted to show/hide, width of column, filter information, sequence of column, text/header of column.
    Once user hit apply button, my grid will update state information as well as save them in database.
    After that it will update grid.

    Now, to update grid i try following.
    Code:
    this.grid.getView().getHeaderCt().updateLayout();
    this.grid.getView().getHeaderCt().doLayout();
    but image of result is as below, it displays grid data but not header.




    If I use this.grid.getStore.load()
    then it works fine. but,I can not load store and send a ajax request each time.

    In extjs 3.4, i use
    Code:
    this.grid.getView().refresh(true);
    and it only refresh view, does not send any request to server.

  4. #4
    Sencha - Documentation Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,162
    Answers
    501
    Vote Rating
    257
      0  

    Default

    What if you do this.grid.getView().refresh()?

  5. #5
    Sencha User
    Join Date
    Sep 2008
    Location
    Paris, France
    Posts
    18
    Vote Rating
    0
      0  

    Default

    Hello,

    Maybe you can use grid.reconfigure(). I use this awsome feature to change dynamycally columns config in my grid. http://docs.sencha.com/extjs/4.2.1/#...od-reconfigure

  6. #6
    Sencha Premium Member
    Join Date
    Apr 2013
    Posts
    55
    Vote Rating
    1
      0  

    Default

    @SLEMMON, this.grid.getView().refresh()?
    I tried that, but gridView does not contain header.container. So it does not make any difference. I want to refresh or reload or reconfigure header.container only. Bcoz when header change, grid atomatically reflect the changes. I do not need to refresh or reconfigure gridView.

  7. #7
    Sencha - Documentation Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,162
    Answers
    501
    Vote Rating
    257
      0  

    Default

    I'm not totally sure what you're doing or what you're needing to see updated in the headerContainer. Perhaps grid.updateLayout? grid.down('headercontainer').updateLayout()?

  8. #8
    Sencha User
    Join Date
    Mar 2014
    Posts
    6
    Vote Rating
    0
      0  

    Default

    Can you tell me how to refresh grid in 4.2.1Thanks,Nishant

  9. #9
    Sencha Premium Member
    Join Date
    Apr 2013
    Posts
    55
    Vote Rating
    1
      0  

    Default

    Hi Nishant,

    I still do not have any answer. Temporarily I am reloading store and that also refresh my grid.

    Thanks.

  10. #10
    Sencha - Documentation Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,162
    Answers
    501
    Vote Rating
    257
      0  

    Default

    You can refresh the grid by calling grid.getView().refresh();
    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our human resources manager: fabienne.bell@sencha.com

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
  •