我使用的jqGrid 4.4.5的jqGrid凍結的列顯示不正確的結構
我有網格配置是這樣的:
$(document).ready(function() {
$('#listROvertime')
.jqGrid({
//url: 'http://localhost/bison/rovertime/listing',
datatype: 'json',
mtype: 'post',
colNames: ["NIK","Nama","Divisi","Jam","Tarif","Total"],
colModel: [
{name:"rovertime_nik",index:"rovertime_nik",width:100,
frozen:true,
key:true,
searchoptions:{
sopt:["eq","ne","bw","bn","ew","en","cn","nc"]
}
},
{name:"rovertime_name",index:"rovertime_name",width:260,
frozen:true,
searchoptions:{
sopt:["eq","ne","bw","bn","ew","en","cn","nc"]
}
},
{name:"rovertime_div",index:"rovertime_div",width:120,
frozen:true,
search:false
},
{name:"rovertime_ocount",index:"rovertime_ocount",width:70,align:"right",
formatter:"currency",
formatoptions:{thousandsSeparator:","},
search:false,
sortable:false
},
{name:"rovertime_oprice",index:"rovertime_oprice",width:110,align:"right",
formatter:"currency",
formatoptions:{thousandsSeparator:","},
search:false,
sortable:false
},
{name:"rovertime_over",index:"rovertime_over",width:110,align:"right",
formatter:"currency",
formatoptions:{thousandsSeparator:","},
search:false,
sortable:false
}
],
autowidth: true,
caption: 'Laporan Lembur'
}).jqGrid('setGroupHeaders', {
useColSpanStyle: true,
groupHeaders: [
{startColumnName: 'rovertime_ocount', numberOfColumns: 3, titleText: '<center>Lembur</center>'}
]
}).jqGrid('setFrozenColumns');
});
結果列結構,我的預期是「NIK,那抹,Divisi, Jam,Tarif,Total,Lain - Lain,Insentif,Total,Potongan Lain - Lain,Total「。 當我在colModel id「rovertime_div」處將凍結選項設置爲false時,列結構顯示正確。否則,當我將凍結選項設置爲true時,列結構顯示不正確。
這裏是一個picture預期結果如何。
UPDATE 1:如果我設置useColSpanStyle:false爲列結構顯示正確。
究竟什麼是你的問題? – dreamweiver 2013-05-13 11:25:22
我期望的結果欄是「NIK,Nama,Divisi,Jam,Tarif,Total,Lain - Lain,Insentif,Total,Potongan Lain - Lain,Total」。 – zenixgrace 2013-05-13 15:56:44
如果你已經找到你的問題的答案,那麼我認爲你應該通過自我回答關閉這個問題 – dreamweiver 2013-05-14 05:53:29