ext的表格列名不显示

peng25peng 2009-09-30 12:43:09
代码如下,应该是DIV的事,但是不知道是那的原因,还希望大虾们多多帮忙
Quality.initLayoutPanel=function()
{
Quality.layout = new Ext.Panel({
height:window.screen.availHeight-215,
monitorResize:true,
layout:'border',
items: [
new Ext.Panel(
{
title: '告警信息',
monitorResize:true,
region:'center',
margins: '-1 0 0 0',
contentEl:"AlarmPanel",
width:600,
html:"<div style='padding:20px 20px 20px 20px;' id='TabInfo'></div>",
autoScroll:true
}),
new Ext.Panel({
title: '提示信息',
region:'east',
collapsible:true,
collapsed:true,
animCollapse :false,
autoScroll:true,
margins: '-1 0 0 0',
cmargins: '0 0 0 0',
width: 200,
minSize: 100,
maxSize: 300,
contentEl:"TipPanel",
html:"<div style='padding:5px;font-size:12px;' id='DetailInfo'>提示信息</div>"
})
]
});
Quality.layout.render("layoutPanel");
}
//Tab面板
//Quality.CreateTab=function()
//{
// Quality.Tab=new Ext.TabPanel(
// {
// id:"AlarmTab",
// renderTo:"TabInfo",
// width:500,
// height:300,
// enableTabScroll:true,
// activeTab: 0,
// items:[new Ext.Panel({
// id:'tab1',
// title:"干扰",
// html:"<div id='tabPanel_1_div'>干扰分析</div>"
// }),
// new Ext.Panel(
// {
// id:'tab2',
// title:"指标",
// html:"<div id='tabPanel_2_div'>指标告警</div>"
// }
// )
// ]
// }
// )
//}
//*********************************TCH掉话告警*********************************//

//TCH掉话告警刷新列表
TCHAlarmInfo.refreshTCHAlarmHandler = function()
{
//刷新告警
/////////////////////////////if(){预留代码}/////////////////////////////////////
if(alarmInfo.timer!= null)
{
clearInterval(alarmInfo.timer);
}
TCHAlarmInfo.TCHHandler(); //创建告警
alarmInfo.timer = setInterval("TCHAlarmInfo.TCHHandler()",1000*10); //刷新
//刷新声音
if(alarmInfo.soundTimer!= null)
{
clearInterval(alarmInfo.soundTimer);
}
alarmInfo.createSound("tchdh",2); //创建声音
alarmInfo.soundTimer = setInterval("alarmInfo.createSound('tchdh',2)",1000*10); //刷新
}

//创建TCH告警列表
TCHAlarmInfo.TCHHandler = function()
{
document.getElementById("TabInfo").innerHTML = "";
TCHAlarmInfo.datalength = _Default.GetTableRecordCount("tchdh").value; //获得表的行数
//获取数据源
TCHAlarmInfo.dataStore = new Ext.data.Store({
proxy:new Ext.data.AjaxProxy(_Default,"GetData"),
reader:new Ext.data.JsonReader({id:"Id",totalRecords:TCHAlarmInfo.datalength},[
{name:'AlarmDate',mapping:'AlarmDate'},
{name:'Period',mapping:'Period'},
{name:'Bsc',mapping:'Bsc'},
{name:'Cell',mapping:'Cell'},
{name:'Station',mapping:'Station'},
{name:'Area',mapping:'Area'},
{name:'Figurevalue',mapping:'Figurevalue'}])
});
//排列格式//配置属性定义
TCHAlarmInfo.column = new Ext.grid.ColumnModel([
{header:"日期",dataIndex:"AlarmDate",width:200,sortable:true},
{header:"时段",dataIndex:"Period",width:200,sortable:true},
{header:"网元",dataIndex:"Bsc",width:200,sortable:true},
{header:"小区",dataIndex:"Cell",width:200,sortable:true},
{header:"基站",dataIndex:"Station",width:200,sortable:true},
{header:"地区",dataIndex:"Area",width:200,sortable:true},
{header:"TCH掉话次数",dataIndex:"Figurevalue",width:200,sortable:true}
]);
TCHAlarmInfo.dataStore;
debugger;
TCHAlarmInfo.grid = new Ext.grid.GridPanel({
id:"tchGrid",
applyTo:"TabInfo",
width:window.screen.availWidth-50,
height:window.screen.availHeight-270,
cm:TCHAlarmInfo.column,
ds:TCHAlarmInfo.dataStore,
autoExpandColumn:0,
tbar:[
new Ext.Button({text:"删除告警",handler:function (){alarmOrder.removeOrder("tchGrid")}})
],
bbar: new Ext.PagingToolbar({
pageSize: 20,
store:TCHAlarmInfo.dataStore,
displayInfo:true,
displayMsg: '当前显示 {0}-{1} 共有记录 {2}'
// doLoad: function(start)
// {
// var o = {},pn = this.paramNames;
// o[pn.start] = start;
// o[pn.limit] = this.pageSize;
// this.store.load({params:o});
// }
})
});
//设置单选一行
TCHAlarmInfo.grid.getSelectionModel().singleSelect = true;
TCHAlarmInfo.dataStore.load({params:{start:0, limit:20, alarmType:'tchdh'}});
document.getElementById("TabInfo").style.display="";
}
...全文
190 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
zgb0331 2009-10-04
  • 打赏
  • 举报
回复
路过,拿分,闪人
豆虫 2009-10-02
  • 打赏
  • 举报
回复
ds:TCHAlarmInfo.dataStore, 改成 store:TCHAlarmInfo.dataStore个人意见
peng25peng 2009-09-30
  • 打赏
  • 举报
回复
貌似还是不行,不过还是谢谢了。
hookee 2009-09-30
  • 打赏
  • 举报
回复
EXTJS2.x的话 ext-all.css中修改这句
.x-grid3-header-offset{padding-left:1px;width:10000px;#width:auto;_width:auto;}

另外,Ext.grid.ColumnModel中每个列的width加起来总和小于等于grid的width设置,试试看

52,797

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Ajax
社区管理员
  • Ajax
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧