Extjs 中的 grid 数据为什么显示不出来
Ext.define("borrowBackOrderModel2",{extend:"Ext.data.Model",fields:[{brrowOrderNum:'b...
Ext.define("borrowBackOrderModel2",{
extend: "Ext.data.Model",
fields:[
{brrowOrderNum: 'brrowOrderNum'},
{orderAmount: 'orderAmount'},
{backAmount: 'backAmount'}
]
});
var borrowBackOrderStore2 = Ext.create('Ext.data.Store',{
model: "borrowBackOrderModel2",
autoLoad: true,
pageSize: 10,
fields:['brrowOrderNum', 'orderAmount', 'backAmount'],
// data:{'items':[
// {brrowOrderNum: '1', orderAmount: '11', backAmount: '111'},
// {brrowOrderNum: '2', orderAmount: '22', backAmount: '222'}
// ]},
// proxy: {
// reader: {
// type: 'json',
// root: 'items'
// }
// }
data:[
['1', '11', '111'],
['2', '22', '222']
]
});
var borrowBackOrderGrid2 = Ext.create('Ext.grid.Panel',{
anchor : '100% 90%',
width : 150,
autoHeight : true,
region:'center',
autoScroll : true,
store : borrowBackOrderStore2,
columnLines: true,
//renderTo: Ext.getBody(),
columns : [
{
header : '借用单号',
flex : 1,
dataIndex : 'brrowOrderNum'
},
{
header : '借用数量',
flex : 1,
dataIndex : 'orderAmount'
},
{
header : '归还数量',
dataIndex : 'backAmount',
sortable : true,
flex : 1
}
]
});
Ext.create('Ext.window.Window',{
title : '归还订单借用信息列表',
style:{
border:5,
padding:10,
},
width: 500,
//height: 200,
autoHeight : true,
autoScroll: true,
resizable: false, //设置不允许调整窗口大小
modal : true,
layout: 'anchor',
closeAction : 'hide',
items : [borrowBackOrderGrid2]
}).show(); 展开
extend: "Ext.data.Model",
fields:[
{brrowOrderNum: 'brrowOrderNum'},
{orderAmount: 'orderAmount'},
{backAmount: 'backAmount'}
]
});
var borrowBackOrderStore2 = Ext.create('Ext.data.Store',{
model: "borrowBackOrderModel2",
autoLoad: true,
pageSize: 10,
fields:['brrowOrderNum', 'orderAmount', 'backAmount'],
// data:{'items':[
// {brrowOrderNum: '1', orderAmount: '11', backAmount: '111'},
// {brrowOrderNum: '2', orderAmount: '22', backAmount: '222'}
// ]},
// proxy: {
// reader: {
// type: 'json',
// root: 'items'
// }
// }
data:[
['1', '11', '111'],
['2', '22', '222']
]
});
var borrowBackOrderGrid2 = Ext.create('Ext.grid.Panel',{
anchor : '100% 90%',
width : 150,
autoHeight : true,
region:'center',
autoScroll : true,
store : borrowBackOrderStore2,
columnLines: true,
//renderTo: Ext.getBody(),
columns : [
{
header : '借用单号',
flex : 1,
dataIndex : 'brrowOrderNum'
},
{
header : '借用数量',
flex : 1,
dataIndex : 'orderAmount'
},
{
header : '归还数量',
dataIndex : 'backAmount',
sortable : true,
flex : 1
}
]
});
Ext.create('Ext.window.Window',{
title : '归还订单借用信息列表',
style:{
border:5,
padding:10,
},
width: 500,
//height: 200,
autoHeight : true,
autoScroll: true,
resizable: false, //设置不允许调整窗口大小
modal : true,
layout: 'anchor',
closeAction : 'hide',
items : [borrowBackOrderGrid2]
}).show(); 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询