ExtJS grid panel不显示数据
<!doctypehtml><head><title>test</title><scripttype="text/javascript"src="../ext-4.2.1...
<!doctype html>
<head>
<title>test</title>
<script type="text/javascript" src="../ext-4.2.1.883/examples/shared/include-ext.js"></script>
</head>
<body>
<script type="text/javascript">
Ext.onReady(function(){
Ext.QuickTips.init();
Ext.define('modelRubrica', {
extend: 'Ext.data.Model',
fields:[
{name: 'm_lei', type: 'string'},
{name: 'm_name', type: 'string'},
{name: 'm_tel', type: 'string'},
{name: 'm_date', type: 'string'},
{name: 'm_time', type: 'string'},
{name: 'm_type', type: 'string'},
{name: 'm_memo', type: 'string'},
{name: 'yy_time', type: 'string'}
]
});
var storeRubrica = Ext.create('Ext.data.Store', {
autoDestroy: true,
model: 'modelRubrica',
proxy: {
type: 'ajax',
url : 'storeRubrica.php',
reader: {
type: 'json'
},
actionMethods: {
read: 'POST'
},
},
autoLoad: true
});
var gridRubrica = Ext.create('Ext.grid.Panel', {
id: 'id_gridRubrica',
title: 'xxx',
width: 1000,
height: 500,
frame: true,
store: storeRubrica,
columns:[
{
text: '类别',
dataIndex: 'test1',
flex: 1
},{
text: '姓名',
dataIndex: 'test2',
flex: 1
},{
text: '电话',
dataIndex: 'm_tel',
flex: 1
},{
text: '日期',
dataIndex: 'm_date',
flex: 1
},{
text: '时间',
dataIndex: 'm_time',
flex: 1
},{
text: '内容',
dataIndex: 'm_type',
flex: 1
},{
text: '备注',
dataIndex: 'm_memo',
flex: 1
},{
text: '操作时间',
dataIndex: 'yy_time',
flex: 1
}
],
});
gridRubrica.render("rubrica");
});
</script>
<div id="rubrica"></div>
</body>
-------------------------------------------------------------------------------
以上没有报错就是数据(yy)没有显示,json有回传数据。
换另一MYSQL(test)数据库就变成正常显示。
我在本机测试是OK的!
在远端如果资料库超过8笔就全部没法显示,8笔以内显示正常,这是啥情况? 展开
<head>
<title>test</title>
<script type="text/javascript" src="../ext-4.2.1.883/examples/shared/include-ext.js"></script>
</head>
<body>
<script type="text/javascript">
Ext.onReady(function(){
Ext.QuickTips.init();
Ext.define('modelRubrica', {
extend: 'Ext.data.Model',
fields:[
{name: 'm_lei', type: 'string'},
{name: 'm_name', type: 'string'},
{name: 'm_tel', type: 'string'},
{name: 'm_date', type: 'string'},
{name: 'm_time', type: 'string'},
{name: 'm_type', type: 'string'},
{name: 'm_memo', type: 'string'},
{name: 'yy_time', type: 'string'}
]
});
var storeRubrica = Ext.create('Ext.data.Store', {
autoDestroy: true,
model: 'modelRubrica',
proxy: {
type: 'ajax',
url : 'storeRubrica.php',
reader: {
type: 'json'
},
actionMethods: {
read: 'POST'
},
},
autoLoad: true
});
var gridRubrica = Ext.create('Ext.grid.Panel', {
id: 'id_gridRubrica',
title: 'xxx',
width: 1000,
height: 500,
frame: true,
store: storeRubrica,
columns:[
{
text: '类别',
dataIndex: 'test1',
flex: 1
},{
text: '姓名',
dataIndex: 'test2',
flex: 1
},{
text: '电话',
dataIndex: 'm_tel',
flex: 1
},{
text: '日期',
dataIndex: 'm_date',
flex: 1
},{
text: '时间',
dataIndex: 'm_time',
flex: 1
},{
text: '内容',
dataIndex: 'm_type',
flex: 1
},{
text: '备注',
dataIndex: 'm_memo',
flex: 1
},{
text: '操作时间',
dataIndex: 'yy_time',
flex: 1
}
],
});
gridRubrica.render("rubrica");
});
</script>
<div id="rubrica"></div>
</body>
-------------------------------------------------------------------------------
以上没有报错就是数据(yy)没有显示,json有回传数据。
换另一MYSQL(test)数据库就变成正常显示。
我在本机测试是OK的!
在远端如果资料库超过8笔就全部没法显示,8笔以内显示正常,这是啥情况? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询