The counter I need to implement is a function like this:
mygrid2.customGroupFormat=function(name,count){
var tot=mygrid2.groupStat(name,8,“stat_total”);
var serv= mygrid2.groupStat(name,7,“stat_total”);
var serv_pen=(serv/tot)*100;
return name+", "+Math.round(serv_pen)+"%";
}
How can this be acheived in custom counters so that column 10 can display the returning value ?
i also looked up this link docs.dhtmlx.com/doku.php?id=dhtm … s_counters
but what is “tag” here?
Pls help!!!
Thanks Olga but when I am attaching your example to my code before calling loadXML,
mygrid2._in_header_stat_summ=function(tag,index,c){ // shortcut for statistics counter
var calck=function(){ // define the function which will be used for calculations
var summ=0; // set initial counter value
this.forEachRow(function(id){ // for each row
summ+=this.cells(id,index).getValue()*1; // add row_value
})
return summ;
}
this._stat_in_header(tag,calck,index,c); //call default statistics handler processor
}
Unfortunately current version of dhtmlxGrid doesn’t support custom counters for group row. As a workaround you can use math operations in dhtmlxTreeGrid. Please check example here dhtmlx.com/docs/products/dht … _math.html
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan