1. #1
    Sencha User
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    20
    Vote Rating
    0
    wqjh7809 is on a distinguished road

      0  

    Default Paging: Load total-property manually

    Paging: Load total-property manually


    Hello, I've got a problem in ExtJS 4.1: I'm using a AJAX proxy with a JSON reader, but the JSON result doesn't contains a total property. For the total number of records I'm using a function with a SOAP request. How can I use this number for the store to run the paging toolbar?

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,007
    Vote Rating
    459
    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 should be able to update using:

    Code:
    	var button = new Ext.Button({
    		text: 'SET totalCount',
    		width: 150,
    		renderTo: Ext.getBody(),
    		handler: function() {
    			store.totalCount = 51;
    			pagingToolbar.onLoad();
    			console.log(store.totalCount);
    		}
    	});
    Scott.

  3. #3
    Sencha User
    Join Date
    Sep 2009
    Location
    There
    Posts
    21
    Vote Rating
    0
    aeiou is on a distinguished road

      0  

    Default totalCount

    totalCount


    Quote Originally Posted by scottmartin View Post
    You should be able to update using:

    Code:
        var button = new Ext.Button({
            text: 'SET totalCount',
            width: 150,
            renderTo: Ext.getBody(),
            handler: function() {
                store.totalCount = 51;
                pagingToolbar.onLoad();
                console.log(store.totalCount);
            }
        });
    Quote Originally Posted by scottmartin View Post
    You should be able to update using:

    Code:
        var button = new Ext.Button({
            text: 'SET totalCount',
            width: 150,
            renderTo: Ext.getBody(),
            handler: function() {
                store.totalCount = 51;
                pagingToolbar.onLoad();
                console.log(store.totalCount);
            }
        });
    I know this is a bit old thread, but I'm running in the same issue: I get a JSON without totalCount property and I DON'T have access to the server side code (there is a endpoint which returns the number of records for a query though). In the same way, I don't see any totalCount config/property in Store documentation.

    So, in order to set it up, can I request the number of results for my query in advance to make the paginated request? Is totalCount documented in elsewhere?

    cheers

Thread Participants: 2

Tags for this Thread