Hi, I have a treetable as bellow. It shows the count grouped by “cardType” correctly, but the count doesn’t change when I filter by any other columns. Can anybody tell me how to make the count column dynamically change when I filter the data? Thanks.
{
view:"treetable",
id:"tableWidget",
autoheight:true,
resizeColumn:true,
resizeRow:true,
url:dataQueryUrl,
footer: true,
columns:[
{
id:groupedColumnId,
header:[groupedColumnTitle, {content:"multiSelectFilter", separator:";"}],
adjust:true,
fillspace:true,
template:function(obj, common){
if (obj.$group) {
return common.treetable(obj, common) + obj.title;
} else {
return '';
}
},
footer: "Total"
},
{id:"nodeId", header:["System ID", {content:"textFilter"}], sort:"string", fillspace:true, template:
function(obj){
if (obj.nodeId === undefined)
return '';
else
return "<a href='#details' onclick='spNetworkModuleViewRouter(""+ obj.nodeId + ""); return false;'>" + obj.nodeId + "</span></a>";
}},
{id:"nodeName", header:["System Name", {content:"textFilter"}], sort:"string", fillspace:true},
{id:"location", header:["Location", {content:"textFilter"}], sort:"string", fillspace:true},
{id:"version", header:["Software Version", {content:"textFilter"}], sort:"string", fillspace:true},
{id:"chassisType", header:["Chassis Type", {content:"multiSelectFilter"}], sort:"string", fillspace:true},
{id:"serialNumber", header:["Serial Number", {content:"textFilter"}], sort:"string", fillspace:true},
{id:"partNumber", header:["Part Number", {content:"textFilter"}], sort:"string", fillspace:true},
{id:"count", header:["Total Number of Cards", {content:"textFilter"}], sort:"int", fillspace:true, footer: {content:"summColumn"}}
],
scheme:{
$group:{
by:groupedColumnId,
map:{
title:[groupedColumnId],
count:[groupedColumnId, "count"]
}
}
}
}