views:

4

answers:

0

Hello,

I am trying to get the amount of rows returned from a ServiceStore call. I am caching the Grid, so I should be able to return the amount of rows with a store.fetch, for some reason store.fetch is making another service call. Here is a code snippet

             grid = new dojox.grid.DataGrid({ 
                    structure:gridLayout, 
                    store:store, 
                    queryOptions:{cache:true} 
            }, "grid"); 

query = { customerName: '', quoteDescription: '', quotedBy: '', agencyAccount: '0011080', LOB: 'Dwelling Fire', quoteStatus: 'All', toDate: '08/01/2010', fromDate: '01/01/2010', state: '', token: token };

grid.setQuery(query);

var size = function(size, request) { console.log("This is the size", size); }; store.fetch({query: grid.attr("query"), onBegin: size, start: 0, count: 0});

Is there a reason why this would make another service call? When I comment out store.fetch, I get only one call, which is what I want, but I lose the row count. I am requiring dojo.require('dojox.data.ClientFilter'); before service and service.store, like the doc says. Any ideas?