I am new to ExtJs and I am not able to load JSON data into the grid in any form - either inline or from a static JSON data file. Any help is highly appreciated.
Only empty grid shows up - without any data.
var Grid1Store = new Ext.data.JsonStore({ root: 'users', fields: [ 'id', 'name', 'email' ], autoLoad: true, data: { users: [ { "id": 1, "name":"John Smith", "email":"[email protected]"}, { "id": 2, "name":"Anna Smith", "email":"[email protected]"}, { "id": 3, "name":"Peter Smith", "email":"[email protected]"}, { "id": 4, "name":"Tom Smith", "email":"[email protected]"}, { "id": 5, "name":"Andy Smith", "email":"[email protected]"}, { "id": 6, "name":"Nick Smith", "email":"[email protected]"} ]} }); var onReadyFunction = function(){ var grid = new Ext.grid.GridPanel({ renderTo: Ext.getBody(), frame: true, title: 'Database', width:300, store: Grid1Store, columns: [ {text: "Id", dataIndex: 'id'}, {text: "Name", dataIndex: 'name'}, {text: "Email", dataIndex: 'email'} ] }); } Ext.onReady(onReadyFunction);