1
我已經實現了jgGrid並啓用了treeGrid。在Firefox上,標題行(帶有標題的列)的寬度與數據行的寬度不同。 我已經把它貼在jqGrid的,並與屏幕顯示圖像關閉問題的鏈接初始化代碼(因爲我是新來的網站,似乎我不能上傳圖片)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});
感謝, 加布裏埃爾