次の Ext 関数を使用して、json 配列から ext グリッドの値をバインドします。URL から json 配列を取得します。問題なく動作します。つまり、値を取得します。 Extjsグリッドの値は、そのグリッドにjson配列の値を追加できません。これを解決するにはどうすればよいですか?
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
});
});