I’m quite new to jqgrid, and maybe I’ve missed something obvius … but my jqgrid table has the header columns (first row) not aligned with the data column (from second row). Any suggestion ?
Here is some code:
var table_height = 400;
// field size
var fs_s = 50;
var fs_m = 200;
var fs_b = 500;
// viste
var col_short_view = ;
var col_full_view = [‘Seriale’,’Inventario’,’Nome’,’Funzioni’,’Stato’,
‘Rete’,’IP’,’Modello’,’Palazzo’,’Dati Tecnici’,’Sist.Operativo’,’Note’,
‘Fattura’,’Garanzia’,’Nagios’,’Backup’,’SOUpdate’,’NTP’,’TODOs’
];
var model_short_view = [
{ name:’serial’,index:’serial’,width:fs_m },
{ name:’inventory’,index:’inventory’,width:fs_m },
{ name:’name’,index:’name’,width:fs_m }
];
var model_full_view = [
{ name:’serial’,index:’serial’,width:fs_m },
{ name:’inventory’,index:’inventory’,width:fs_m },
{ name:’name’,index:’name’,width:fs_m },
{ name:’functions’,index:’functions’,width:fs_b },
{ name:’state’,index:’state’,width:fs_s },
{ name:’net’,index:’net’,width:fs_s },
{ name:’ip’,index:’ip’,width:fs_m },
{ name:’model’,index:’model’,width:fs_m },
{ name:’place’,index:’place’,width:fs_m },
{ name:’techData’,index:’techData’,width:fs_b },
{ name:’sysop’,index:’sysop’,width:fs_m },
{ name:’notes’,index:’notes’,width:fs_b },
{ name:’invoice’,index:’invoice’,width:fs_s },
{ name:’garantie’,index:’garantie’,width:fs_s },
{ name:’nagios’,index:’nagios’,width:fs_s },
{ name:’backup’,index:’backup’,width:fs_s },
{ name:’uptodate’,index:’uptodate’,width:fs_s },
{ name:’ntp’,index:’ntp’,width:fs_s },
{ name:’todos’,index:’todos’,width:fs_b }
];
// All’avvio (dopo il caricamento della pagina)
$(document).ready(function() {
$(“#tabella”).jqGrid({
height: table_height,
url: ‘/cgi-bin/SAssett.pl’,
datatype: ‘xml’,
mtype: “POST”,
colNames: col_short_view,
colModel: model_short_view,
// colNames: col_full_view,
// colModel: model_full_view,
rowNum: 15,
pager: $(‘#pager’),
rowList: [15,50],
sortname: ‘name’,
sortorder: ‘asc’,
viewrecords: true,
imgpath: ‘themes/basic/images’,
caption: ‘Server List’,
width: 1200
});
});
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top