ExtJs4.0 grid表格不显示数据
Ext.require([
'Ext.data.*',
'Ext.grid.*',
'Ext.form.*',
'Ext.toolbar.Paging'
]);
Ext.onReady(function() {
Ext.QuickTips.init();
Ext.define('User', {
extend : 'Ext.data.Model',
fields: [
{name: 'userID',type:'int',mapping:'userID'},
{name: 'deptNo',type:'int'},
{name: 'userCode',type: 'string'},
{name: 'userName',type: 'string'},
{name: 'deptName',type: 'string'},
{name: 'parentDeptName', type:'string'},
{name: 'userPsw', type:'string'},
{name: 'userSex',type:'string'},
{name: 'userTel',type:'string'},
{name:'userEmail',type:'string'}
]});
var gridStore = Ext.create('Ext.data.Store', {
storeId:'userGridStore',
model : 'User',
proxy : {
type : 'ajax',
//url:'user/user.json'
url : 'getUserGridJson.action'
},
reader:{
type:'json',
root:'items'
},
autoLoad : true
});
var grid = Ext.create('Ext.grid.Panel', {
store: gridStore,
columnLines: true,
height: 460,
width: 900,
title: '用户管理',
frame : true,
selType : 'rowmodel',
viewConfig: {
loadMask : {msg : '正在加载数据,请稍等...' },
stripeRows: true
},
renderTo: 'user_grid',
columns: [{
header : '登录名',
//locked : true,
width : 100,
sortable : false,
dataIndex: 'userCode',
&nb