-
Notifications
You must be signed in to change notification settings - Fork 0
/
40colspan.js
42 lines (42 loc) · 1.18 KB
/
40colspan.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
jQuery("#colspan").jqGrid({
url:'server.php?q=4',
datatype: "json",
colNames:['Date', 'Inv No', 'Client', 'Amount','Tax','Total','Notes'],
colModel:[
{name:'invdate',index:'invdate', width:90},
{
name:'id',
key : true,
index:'id',
width:55,
cellattr: function(rowId, value, rowObject, colModel, arrData) {
return ' colspan=2';
},
formatter : function(value, options, rData){
return "Invoce: "+value + " - "+rData['name'];
}
},
{name:'name', index:'name', width:100,
cellattr: function(rowId, value, rowObject, colModel, arrData) {
return " style=display:none; ";
}
},
{name:'amount',index:'amount', width:80, align:"right"},
{name:'tax',index:'tax', width:80, align:"right"},
{name:'total',index:'total', width:80,align:"right"},
{name:'note',index:'note', width:150, sortable:false}
],
rowNum:10,
width:700,
rowList:[10,20,30],
pager: '#pcolspan',
sortname: 'invdate',
viewrecords: true,
sortorder: "desc",
jsonReader: {
repeatitems : false
},
caption: "Data colspan",
height: '100%'
});
jQuery("#colspan").jqGrid('navGrid','#pcolspan',{edit:false,add:false,del:false});