我正在使用jqGrid(不是Gurrido版本/ jqGrid 4.6版本),但是单元格和标题的对齐方式出现问题。
You can see the problem here :
以及网格代码:
gridTr.jqGrid({
url: "http://localhost/projetMecenat/public/tranches/projet/{{ $ID_PROJET }}",
mtype: "POST",
datatype: 'json',
colNames: ["Type contact","Numéro","Libellé","Montant mini","Montant maxi","Montant réel"],
colModel: [
{name: "TYPE_CONTACT", sortable: false, width: 100, align:"center"},
{name: "CPT_TRANCHE", width: 30, align:"center"},
{name: "LIBCOD", width: 150, align: "center", sortable: false},
{name: "MT_SOUTIEN_MINI", sortable: false, width: 100, align:"center"},
{name: "MT_SOUTIEN_MAXI", width: 100, align:"center"},
{name: "MT_REEL", width: 200, align: "center", sortable: false}
],
loadtext: "Chargement...",
viewrecords: true,
emptyrecords: "Aucune délibération",
width: 680,
height: 300,
rowNum: 100,
sortable: true,
loadonce: true,
hidegrid: false,
multipleSearch: true,
shrinkToFit: false,
gridview: true,
autoencode: false,
gridComplete: function() {
console.log("grid tranche load successfully");
}
})
从服务器发送的JSON:
[{"ID_CONTREPARTIE":1,"FAMIL_CTRPRT_":1,"LIBEL_CTRPRT":"Contrepartie 1","DETAIL_CTRPRT":null,"PRECISION_TRCH":null,"CORRESP_MONETAIRE":null,"NUM_MINI":2000,"NUM_MAXI":2500,"DTNEW":"2020-02-17","DTMAJ":"2020-02-17","UTILNEW":"HMA","UTILMAJ":"SBR","ID_PROJET":201,"CDCOD":"FAMIL_CTRPRT","CLECOD":1,"LIBCOD":"Communication","VALCOD1":"","VALCOD2":null,"FAMIL_CTRP":"Communication"}]
有人有想法吗?