我已经在启用了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});
谢谢, 加布里埃尔
答案 0 :(得分:3)