Results 1 to 2 of 2

Thread: grid hook on reload, resort. How?

  1. #1
    Ext GWT Premium Member
    Join Date
    Oct 2009
    Posts
    139
    Vote Rating
    5
      0  

    Default 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,390
    Answers
    716
    Vote Rating
    498
      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.

Posting Permissions

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