我从后台读取AJAX文件 要求是按日期查询的 然后每天有一个记录 没有的话就是条只有日期的空记录
我用FIREBUG看了返回数据 确实是有空记录的
然后我发现EXTJS把我JSON返回的空记录全部都隐藏了 再GRID上不显示
但是我需要显示这些空数据啊
我的配置
var reader = new Ext.data.JsonReader(
{
root: "results"
},
[
{ name: 'id' },
{ name: 'datetime' ,
type : 'date',
dateFormat : 'Y-m-d'},
{ name: 'contact' }
]
);
var grid4 = new xg.GridPanel({
id:'button-grid',
store: store,
cm: new xg.ColumnModel([
{header: "日期", width: 120, sortable: true, dataIndex: 'datetime'},
{header: "asdasd", width: 40, sortable: true, dataIndex: 'contact'}
]),
sm: sm2,
viewConfig: {
forceFit:true
},
loadMask:true,
width:600,
height:600,
frame:true,
title:'OOXX',
iconCls:'icon-grid'
});
我用FIREBUG看了返回数据 确实是有空记录的
然后我发现EXTJS把我JSON返回的空记录全部都隐藏了 再GRID上不显示
但是我需要显示这些空数据啊
我的配置
var reader = new Ext.data.JsonReader(
{
root: "results"
},
[
{ name: 'id' },
{ name: 'datetime' ,
type : 'date',
dateFormat : 'Y-m-d'},
{ name: 'contact' }
]
);
var grid4 = new xg.GridPanel({
id:'button-grid',
store: store,
cm: new xg.ColumnModel([
{header: "日期", width: 120, sortable: true, dataIndex: 'datetime'},
{header: "asdasd", width: 40, sortable: true, dataIndex: 'contact'}
]),
sm: sm2,
viewConfig: {
forceFit:true
},
loadMask:true,
width:600,
height:600,
frame:true,
title:'OOXX',
iconCls:'icon-grid'
});
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货