1. #1
    Ext GWT Premium Member
    Join Date
    Oct 2009
    Posts
    131
    Vote Rating
    5
    zlevardy is on a distinguished road

      0  

    Default Unanswered: grid hook on reload, resort. How?

    Unanswered: grid hook on reload, resort. How?


    hi,

    I am doing a paging remotely with bbar. And having some input fields to filter result. It is all good until user click on my search button. But the problem comes once user clicking on column headers to sort again, or by clicking reload at the paging toolbar. How can I hook over column head clicks (reorder), or even the reload icon on paging toolbar? I would like always include all my search criteria fields attached to query. I cannot find where to ingest this logic, or what method to overwrite...

    thank you

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,112
    Answers
    678
    Vote Rating
    470
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    You can use the beforeload event of the store to maintain your search:

    Code:
    listeners: {
    	beforeload: function(){
    		var searchValue = toolbar.down('#search-field').value;
    		store.getProxy().extraParams = {}; // clear all previous
    		store.getProxy().extraParams.search = searchValue; // update persistent param
    
    	}
    }
    Scott.

Thread Participants: 1