首先创建store:
var store = Ext.create('Ext.data.Store', {
fields: [
{ name: 'IntData', type: 'int' },
{ name: 'StringData', type: 'string' },
{ name: 'TimeData', type: 'date' }
],
autoLoad: true,
proxy: {
type: 'ajax',
url: 'gridData.json',
reader: {
type: 'json',
root: 'rows'
}
}
});
然后创建form:
Ext.create('Ext.form.Panel', {
renderTo: Ext.getBody(),
border: 0,
width: 700,
layout: 'column',
items: [
{
columnWidth: 0.6,
xtype: 'gridpanel',
store: store,
title: 'Grid列表',
collapsible: true,
columns: [
{ text: '