我创建了一个jqGrid表,它在Chrome中看起来与预期一样,但在Mozilla Firefox中是不整洁的。请参阅下面的屏幕截图和代码。在Firefox中重新加载或排序后,它正确呈现。有谁知道如何纠正Firefox中的初始渲染?
Mozilla Firefox中的界面(重新加载或排序之前)
代码
jQuery(document).ready(function(){
$('#tbl_name').jqGrid('autoWidthColumns').jqGrid({
url:'GRID/grid_manageProvinsi_data.php?type=provinsi',
datatype: 'json',
colNames:['Action','Provinsi','Harga (Untuk Pengiriman Barang)','Terakhir di Update','Updater'],
colModel:[
{name:'action',index:'action', width:30, align:'center', sortable:false, search:false, searchoptions:{sopt:['eq','cn']}},
{name:'nama_prov',index:'nama_prov', width:80, align:'left', sortable:true, search:true, searchoptions:{sopt:['eq','cn']}},
{name:'harga',index:'harga', width:80, align:'center', sortable:true, search:true, searchoptions:{sopt:['eq','cn']}},
{name:'last_update',index:'last_update', width:120, align:'center', search:true, searchoptions: { sopt: ['eq','ne','lt','le','gt','ge'], dataInit: function (elem) { $(elem).datepicker({ showButtonPanel: true }) } }, align:'center'},
{name:'email',index:'email', width:50, align:'left', search:true, searchoptions:{sopt:['eq','cn']}}
],
pager: '#tbl_name_pager',
rowNum: 30,
rowList: [10, 20, 30],
sortname: 'nama_prov',
sortorder: 'asc',
viewrecords: true,
gridview: true,
caption: 'Manage Provinsi',
width: $(window).width() - 275,
height: $(window).height() - 230,
rownumbers: true,
loadComplete: function () {
$(this).find('>tbody>tr.jqgrow:odd').addClass('myAltRowClassEven');
$(this).find('>tbody>tr.jqgrow:even').addClass('myAltRowClassOdd');
}
});
jQuery('#tbl_name').jqGrid('navGrid','#tbl_name_pager',{edit:false,add:false,del:false},
{}, // edit options
{}, // add options
{}, //del options
{multipleSearch:true,width:400});
});