私のストアからこのデータをロードしています。誰でもデータを動的にロードする方法を教えてください。 Ajaxを使用する。extJSグリッドでJSONデータを取得する方法
私のコード
Ext.create('Ext.data.Store', {
storeId: 'simpsonsStore',
fields:[ 'name', 'email', 'phone'],
data: [
{ name: 'Lisa', email: '[email protected]', phone: '555-111-1224' },
{ name: 'Bart', email: '[email protected]', phone: '555-222-1234' },
{ name: 'Homer', email: '[email protected]', phone: '555-222-1244' },
{ name: 'Marge', email: '[email protected]', phone: '555-222-1254' }
]
});
Ext.create('Ext.grid.Panel', {
title: 'Simpsons',
store: Ext.data.StoreManager.lookup('simpsonsStore'),
columns: [
{ text: 'Name', dataIndex: 'name' },
{ text: 'Email', dataIndex: 'email', flex: 1 },
{ text: 'Phone', dataIndex: 'phone' }
],
height: 200,
width: 400,
renderTo: Ext.getBody()
});
は今、データ私はいくつかのJSONファイルに入れます。私の質問は、extJSグリッドストアでJSONデータを取得する方法です。 STOREコードの書き換え方法
こんにちはダビデはたとえば&、について説明するために、このリンクを参照してください。 http://stackoverflow.com/questions/10918030/loading-data-from-a-json-file- ext-into-into-extjs – Tejas