1. #1
    Ext JS Premium Member
    Join Date
    Mar 2010
    Posts
    1
    Vote Rating
    0
    abeutel is on a distinguished road

      0  

    Default Grid-refreshing issues with PagingToolbar

    Grid-refreshing issues with PagingToolbar


    Short summary of problem: Unexpected grid-refreshing issue once I paged through a result list with the PagingToolbar. The updated Json store results are not displayed in the grid (and toolbars).

    I built a gridPanel to display a search result list. Data is retrieved from a Json store. The grid panel resides inside a tabPanel that is created if I execute a search. First of all the result tab and the gridPanel are properly created and populated as expected. If I change the searchterm and execute a new search on the Json store, I can see (in Firebug), that the store reloads and updates from the server, even paging in the results works fine so far. But once I paged trough the results (via the toolbar buttons) and then execute a new search, the grid does not update (nor does the toolbar) whilst the Json store *is* updated (which I can verify using Firebug to look at the return values). Even debugging the number of results in the store gives the expected (updated) value. So only the grid itself does not reflect the changes.

    The Json store has two listeners, one for load and one for exception, both are called and work properly (tested with console.log()).

    When I encountered this grid-refresh-issue the first time, I modified the script to destroy (identified by its id) the result tab panel prior a new search is executed. This also works fine - until I once page in the grid using the toolbar, afterwards the result tab is no longer destroyed (although no error is logged in the console).

    I have no further ideas how to isolate the cause of the rendering problem since it seems not to becaused by the Json store - any suggestion is welcome!

    Andreas
    Code:
    var resultList = new Ext.grid.GridPanel({
    	id: 'result-list',
    	width: 430,
    	autoHeight: true,
    	title: 'Search Results',
    	store: this.resultListJsonStore,
    	trackMouseOver: true,
    	disableSelection: true,
    	loadMask: true,
    	header: false,
    	hideHeaders: true,
    	enableHdMenu: false,
    	collapsible: false,
    	columns: [{
    		id: 'topic',
    		header: "Results by Searchterm",
    		dataIndex: 'relevance',
    		width: 430,
    		renderer: this.renderSingleItem,
    		sortable: false,
    		loadMask: true
    	}],
    	viewConfig: {
    		forceFit: true,
    		enableRowBody: true,
    		showPreview: true,
    		getRowClass : function(record, rowIndex, p, resultListJsonStore){
    			return 'x-grid3-row-collapsed';
    		}
    	},
    	tbar: new Ext.PagingToolbar({
    		id: 'result-list-tbar',
    		pageSize: 10,
    		store: this.resultListJsonStore,
    		displayInfo: true,
    		displayMsg: 'Results {0} - {1} of {2}',
    		emptyMsg: "No results"
    	}),
    
    		// paging bar on bottom
    	bbar: new Ext.PagingToolbar({
    		id: 'result-list-bbar',
    		pageSize: 10,
    		store: this.resultListJsonStore,
    		displayInfo: true,
    		displayMsg: 'Results {0} - {1} of {2}',
    		emptyMsg: "No results"
    	})
    });
    Last edited by abeutel; 2 Nov 2010 at 4:17 PM. Reason: Fixed a typo

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    96
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    1. How are you searching?
    2. Put your search params in the store baseParams and start and limit in the load params.

Similar Threads

  1. [CLOSED]Grid removeAll() and PagingToolbar refreshing
    By markalroberts in forum Ext 3.x: Bugs
    Replies: 9
    Last Post: 28 Feb 2013, 12:35 AM
  2. Issues with Refreshing ComboBox when reloading Store...
    By Wilhelm in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 28 Mar 2010, 3:33 PM
  3. Search with PagingToolbar not refreshing
    By zendguru in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 16 Jun 2008, 10:41 AM
  4. start, limit refreshing the grid via PagingToolbar
    By mysticav in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 22 Apr 2008, 11:25 PM
  5. Refreshing PagingToolbar after deleting record from store
    By eviltofu in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 25 Oct 2007, 1:17 AM

Thread Participants: 1

Tags for this Thread