var records=Ext.data.Record.create([
//车型分组
{name:'motogroup'},
//车型
{name:'motorcyclename'},
//保养级(期)别
{name:'equipmentOrOil',type:'string'},
//1级保养
{name:'oneji',type:'int'},
//复出保养
{name:'fcb',type:'int'},
//1期保养
{name:'oneqi',type:'int'},
//车辆封存
{name:'fengcun',type:'int'},
//换季保养
{name:'huanji',type:'int'}
]);
var store=new Ext.data.GroupingStore({
proxy: new Ext.data.HttpProxy({url: "carservice/vqftask!equipmentAndOilSY.action"}),
reader: new Ext.data.JsonReader({
root: 'root'
},records),
sortInfo:{field: 'motogroup', direction: "ASC"},
groupField:'motorcyclename'
});
var grid=new Ext.grid.GridPanel({
region:'center',
loadMask:{msg:'正在载入数据,请稍候...'},
stripeRows:true,
frame:true,
cm:cm,
view: new Ext.grid.GroupingView({
forceFit:true,
groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})'
}),
collapsible: true,
animCollapse: false,
title: '
iconCls: 'icon-grid',
store:store
});
后台json字符串: {root:[{motorcyclename:'大众',equipmentOrOil:'器材指标(车份)',oneji:'2',fcb:'3',oneqi:'4',fengcun:'5',huanji:'6'}]}
为什么,我grid里面不能显示数据。没有报错
等待回答