87,991
社区成员
发帖
与我相关
我的任务
分享
Ext.onReady(function () {
var store = Ext.create('Ext.data.Store', {
fields: ["Id", "GUID", "UserID", "UserGUID", "UserName", "UserLoginName", "UserLoginPassword", "UserPhone", "UserEmail"],
proxy: {
type: 'ajax',
url: 'data.txt',
reader: {
type: 'json',
successProperty:'IsSuccess',
root: 'Data.PageData'///ext可以直接配置root
}
}, autoLoad: true
});
. . .
. . .(省略)
是Extjs中的store获取数据的一种格式 Ext.onReady(function () {
var store = Ext.create('Ext.data.Store', {
fields: ["Id", "GUID", "UserID", "UserGUID", "UserName", "UserLoginName", "UserLoginPassword", "UserPhone", "UserEmail"],
proxy: {
type: 'ajax',
url: 'data.txt',
reader: {
type: 'json',
root: 'Data.PageData'///ext可以直接配置root
}
}, autoLoad: true
});
Ext.create('Ext.grid.Panel', {
store: store,
columns: [
{ text: 'Id', dataIndex: 'Id' },
{ text: 'GUID', dataIndex: 'GUID' },
{ text: 'GUID', dataIndex: 'GUID' },
{ text: 'UserName', dataIndex: 'UserName' }
],
height: 200,
width: 400,
renderTo: Ext.getBody()
});
});