function drawTable(url){
$('#reportList').jqGrid({
url: url,
mtype: 'GET',
datatype: 'json',
shrinkToFit:false,
width:null,
colNames:['num', 'in_charge', 'section1','section2','product','product_description','status','rate','start_date','end_date','proceed_detail'],
colModel:[
{name:'num', index:'num', hidden:true},
{name:'in_charge', index:'in_charge', hidden:true},
{name:'section1', index:'section1', width:70},
{name:'section2', index:'section2', width:140},
{name:'product', index:'product', width:80},
{name:'product_description', index:'product_description', width:300},
{name:'status', index:'status', width:45},
{name:'rate', index:'rate', width:50},
{name:'start_date', width:80, index:'start_date'},
{name:'completion_date', width:80, index:'completion_date'},
{name:'proceed_detail', index:'proceed_detail', width:400}
],
pager: '#pager',
multiselect: true,
rownumbers: true,
shrinkToFit:false,
loadonce: true,
});
}
I retrieve data from server and display it in jqGrid
.
First and Second components in colModel
are hidden components. So, 'section1' is the first column components to be displayed in jqGrid
.
Multiple rows may have same section1
and section2
.
So, What I want to do is to merge rows that have same section1 and section2. Basic tag provides rowspan
to merge rows.
However, jqGrid
never provides that function by default. I've searched stackoverflow for a long time to find the solution, but was unable to do so.