JavaScript
Run Code
Open in Fiddle
/*Ext.define('Ext.overrides.data.Store', { override: 'Ext.data.Store', applyData: function (data, dataCollection) { if (data && data.isCollection) { data.addObserver(this); } return this.callParent(arguments); } });*/ Ext.application({ name : 'Fiddle', launch : function() { var collection = Ext.create('Ext.util.Collection', { rootProperty: 'data' }); var store = Ext.create('Ext.data.Store', { model: 'Ext.data.Model', data: collection }); Ext.create('Ext.grid.Panel', { plugins: 'viewport', columns: [{ text: 'ID', dataIndex: 'id', flex: 1 }], store: store }); store.add({ id2: 'foobar' }); } });