I'll be thankful for quick correspondence.
It was checked.
But it was insufficient.
The one indicated first is a simple source, and actual condition uses by 6 columns in front of sum.
A problem wasn't settled in this case.
When "Test1"~"Test3" is changed to hidden, it occurs.
Please look it.
=== Source near practical use ===
<script>
$(function () {
var obj = { width: 400, height: 300 };
obj.colModel = [ { title:"id", dataIndx:"id", hidden: true }
,{ title:"Test" , dataIndx:"a" }
,{ title:"Test2", dataIndx:"b" }
,{ title:"Test3", dataIndx:"c" }
,{ title:"Test4", dataIndx:"d" }
,{ title:"type", dataIndx:"type" }
,{ title:"Sum", dataIndx:"sum" }
,{ title:"data1", dataIndx:"data1" }
,{ title:"data2", dataIndx:"data2" }];
obj.freezeCols = 7;
obj.dataModel = { data: [{ "id":"1", "a":"test1", "b":"2", "c":"3", "d":"4", "type":"A", "sum":"6", "data1":"1", "data2":"5" }
, { "id":"2", "a":"test1", "b":"2", "c":"3", "d":"4", "type":"B", "sum":"6", "data1":"2", "data2":"4" }]};
var $grid = $("#grid").pqGrid(obj);
var mergeAry = [];
mergeAry.push({r1: 0, c1: 1, rc:2, cc:1});
mergeAry.push({r1: 0, c1: 2, rc:2, cc:1});
mergeAry.push({r1: 0, c1: 3, rc:2, cc:1});
mergeAry.push({r1: 0, c1: 4, rc:2, cc:1});
$grid.pqGrid({mergeCells: mergeAry});
$grid.pqGrid("refreshView");
});
function chgHidden(i) {
var colModel = $("#grid").pqGrid("getColModel");
colModel.hidden = !colModel.hidden;
$("#grid").pqGrid("option", "colModel", colModel);
$("#grid").pqGrid("refreshView");
}
</script>
<body>
<input type="button" onclick="chgHidden(1);" value="Test1 Hidden">
<input type="button" onclick="chgHidden(2);" value="Test2 Hidden">
<input type="button" onclick="chgHidden(3);" value="Test3 Hidden">
<input type="button" onclick="chgHidden(4);" value="Test4 Hidden">
<div id="grid" style="margin:auto;"></div>
</body>