百度提问题 在extjs页面中,显示从数据库中查询的数据,列数过多,无法显示,怎么解决啊
Ext.onReady(function(){Ext.QuickTips.init();vargroupCm=newExt.grid.ColumnModel([group...
Ext.onReady(function(){
Ext.QuickTips.init();
var groupCm = new Ext.grid.ColumnModel([
groupSm,
new Ext.grid.RowNumberer(),
{header:'ID',sortable:true,dataIndex:'id'},
{header:'DN',sortable:true,dataIndex:'dn'},
{header:'PERFID',sortable:true,dataIndex:'perfid'},
{header:'COLLTIME',sortable:true,dataIndex:'colltime'},
{header:'DELAYTIME',sortable:true,dataIndex:'delaytime'},
{header:'REMARK',sortable:true,dataIndex:'remark'},
{header:'STATUS',sortable:true,dataIndex:'status'},
{header:'RESULTCODE',sortable:true,dataIndex:'resultcode'},
{header:'RESULTDESC',sortable:true,dataIndex:'resultdesc'},
{header:'NEXTTIME',sortable:true,dataIndex:'nexttime'},
{header:'EXECTIME',sortable:true,dataIndex:'exectime'},
{header:'SUMTYPE',sortable:true,dataIndex:'sumtype'}
]);
groupStore.load();
var groupGrid = new Ext.grid.GridPanel({
id: 'group_grid',
store: groupStore,
cm: groupCm,
sm: groupSm,
border: false,
region: 'center',
stripeRows: true,
viewConfig: {
forceFit:true
},
margins:'0 0 0 0',
width:600
title:'SQLC_COLLECT信息',
loadMask: {msg: '正在加载数据,请稍侯……'},
bbar: new Ext.PagingToolbar({
pageSize: 20,
store: groupStore,
displayInfo: true,
displayMsg: '第 {0} - {1}条记录 ,共 {2}条记录',
emptyMsg: '没有找到已经定义的操作'
})
}); 展开
Ext.QuickTips.init();
var groupCm = new Ext.grid.ColumnModel([
groupSm,
new Ext.grid.RowNumberer(),
{header:'ID',sortable:true,dataIndex:'id'},
{header:'DN',sortable:true,dataIndex:'dn'},
{header:'PERFID',sortable:true,dataIndex:'perfid'},
{header:'COLLTIME',sortable:true,dataIndex:'colltime'},
{header:'DELAYTIME',sortable:true,dataIndex:'delaytime'},
{header:'REMARK',sortable:true,dataIndex:'remark'},
{header:'STATUS',sortable:true,dataIndex:'status'},
{header:'RESULTCODE',sortable:true,dataIndex:'resultcode'},
{header:'RESULTDESC',sortable:true,dataIndex:'resultdesc'},
{header:'NEXTTIME',sortable:true,dataIndex:'nexttime'},
{header:'EXECTIME',sortable:true,dataIndex:'exectime'},
{header:'SUMTYPE',sortable:true,dataIndex:'sumtype'}
]);
groupStore.load();
var groupGrid = new Ext.grid.GridPanel({
id: 'group_grid',
store: groupStore,
cm: groupCm,
sm: groupSm,
border: false,
region: 'center',
stripeRows: true,
viewConfig: {
forceFit:true
},
margins:'0 0 0 0',
width:600
title:'SQLC_COLLECT信息',
loadMask: {msg: '正在加载数据,请稍侯……'},
bbar: new Ext.PagingToolbar({
pageSize: 20,
store: groupStore,
displayInfo: true,
displayMsg: '第 {0} - {1}条记录 ,共 {2}条记录',
emptyMsg: '没有找到已经定义的操作'
})
}); 展开
3个回答
展开全部
var ne_store = new Ext.data.Store({
url : servletUrl,
reader : new Ext.data.JsonReader({
root : 'root',
successProperty : 'success'
}, [{
name : 'ne_cn_name'
}, {
name : 'objectid'
}, {
name : 'object_class'
}])
});
reader要用jsonReader,用数组的不行哦,上面是我写东西用到的一个store。希望对你有用 。下面是后台返回的json字符串,,],success:true}这样就能显示出来了
url : servletUrl,
reader : new Ext.data.JsonReader({
root : 'root',
successProperty : 'success'
}, [{
name : 'ne_cn_name'
}, {
name : 'objectid'
}, {
name : 'object_class'
}])
});
reader要用jsonReader,用数组的不行哦,上面是我写东西用到的一个store。希望对你有用 。下面是后台返回的json字符串,,],success:true}这样就能显示出来了
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询