I use the following Ext function for bind the values in ext grid from the json array.I get the the json array from the URL.It will work Fine,which means i get the values.And my problem is If i try to bind the values in Extjs grid i cant able to add the json array values in that grid.How to solve this?
Ext.onReady(function(){
var proxy=new Ext.data.HttpProxy({url:'http://someurl'});
var reader=new Ext.data.JsonReader({},[
{name: 'User_Id', mapping: 'User_Id'},
{name: 'First_Name', mapping: 'First_Name'},
{name: 'Last_Name', mapping: 'Last_Name'},
{name: 'Notes', mapping: 'Notes'}
]);
//alert(reader);
var store=new Ext.data.Store( {
proxy:proxy,
reader:reader
});
store.load();
// create the grid
var grid = new Ext.grid.GridPanel({
store: store,
columns: [
{header: "User_Id", width: 60, dataIndex: 'User_Id', sortable: true},
{header: "First_Name", width: 60, dataIndex: 'First_Name', sortable: true},
{header: "Last_Name", width: 60, dataIndex: 'Last_Name', sortable: true},
{header: "Notes", width:80, dataIndex: 'Notes', sortable: true}
],
renderTo:'example-grid',
width:2000,
height:1000
});
});