maecy m
maecy m

Reputation: 1397

How do I call my store? I'm using Extjs 4.2

I am trying to get the summary of the values in my grid, since the extjs already has a function sum in store, it will be the easiest way, but I'm having a hard time calling the store.

Upvotes: 0

Views: 66

Answers (1)

Tango Ben
Tango Ben

Reputation: 165

The easiest way may be to do grid.getStore(). Generally, you can access a store via the Ext.getStore() method.

Example: for a store like

Ext.define('Commute.store.Routes', {
     autoLoad: true,
     model: 'Commute.model.Route', 
     extend: 'Ext.data.ArrayStore',
     data: [
        [1, 'To Work by bus'],
        [2, 'To Home by bus'],
        [3, 'To Work by bike'],
        [4, 'To Home by bike']
     ],
});

you can call Ext.getStore('Routes').

Upvotes: 0

Related Questions