jqGrid标题宽度与数据列宽度不同

时间:2010-09-27 15:36:15

标签: javascript jquery firefox jqgrid

我已经在启用了treeGrid的情况下实现了jqGrid。在Firefox上,标题行的宽度(列的标题)与数据行的宽度不同。 我已经附加了jqGrid的初始化代码和一个带有屏幕截图的链接问题(因为我是网站新手,看来我无法上传图片)

jQuery("#treegrid").jqGrid({
   treeGrid: true,
   treeGridModel: 'nested',
   ExpandColumn : 'customer',
   url: 'index.php?page=902&uid=' + uid + '&forecast_pageno=' + pageno,
   datatype: "json",
   mtype: "POST",
      colNames:["Id","Type","Customer","Year","%" , "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "Total", "Status"],
      colModel:[
         {name:'id',index:'id',hidden:true},
         {name:'type',index:'type',hidden:true},
         {name:'customer',index:'customer', width:225, align:"left", sortable:false, fixed:true},
         {name:'year', index:'year', width:45, sortable:false, align:"right"},
     {
             name:'market_increase',
             index:'market_increase',
             width:30,
             editable:true, editrules:{number:true},
             formatter:marketIncreaseFormatter,
             unformat:marketIncreaseUFormatter, sortable:false, align:"right"
         },
         {name:'jan', index:'jan', width:60, editable:true, editrules:{number:true}, sortable:false, align:"right"},
         {name:'feb', index:'feb', width:60, editable:true, editrules:{number:true}, sortable:false, align:"right"},
         {name:'mar', index:'mar', width:60, editable:true, editrules:{number:true}, sortable:false, align:"right"},
         {name:'apr', index:'apr', width:60, editable:true, editrules:{number:true}, sortable:false, align:"right"},
         {name:'may', index:'may', width:60, editable:true, editrules:{number:true}, sortable:false, align:"right"},
         {name:'jun', index:'jun', width:60, editable:true, editrules:{number:true}, sortable:false, align:"right"},
         {name:'jul', index:'jul', width:60, editable:true, editrules:{number:true}, sortable:false, align:"right"},
         {name:'aug', index:'aug', width:60, editable:true, editrules:{number:true}, sortable:false, align:"right"},
         {name:'sep', index:'sep', width:60, editable:true, editrules:{number:true}, sortable:false, align:"right"},
         {name:'oct', index:'oct', width:60, editable:true, editrules:{number:true}, sortable:false, align:"right"},
         {name:'nov', index:'nov', width:60, editable:true, editrules:{number:true}, sortable:false, align:"right"},
         {name:'dec', index:'dec', width:60, editable:true, editrules:{number:true}, sortable:false, align:"right"},
         {name:'total', index:'total', width:60, sortable:false, align:"right"},
         {name:'status', index:'status', hidden:true}

      ],
   height:'auto',
   cellEdit: true,
   rowNum: -1});

Screenshot Image

谢谢, 加布里埃尔

1 个答案:

答案 0 :(得分:3)

Okey,似乎我在jqGrid中使用了一个不同的css文件,来自旧版本。 css的更新解决了这个问题。 谢谢,加布里埃尔