The #stat_total doesn’t seem to work when there are commas in a group which happens when using the price column format. I would like to use commas for readability. Does anyone know of a workaround?
Unfortunately issue can’t be reconstructed locally.
If issue still occurs for you - please open ticket at support.dhtmlx.com/ and provide any kind of sample or demo link where it can be reconstructed.
I was able to solve it by debugging using the source. Line 493 (source) of dhtmlxgrid_group.js converts the cell string value to a number. This fails with formatted numbers. I added a RegEx to the instance of the _b_processing function to remove the commas before conversion.
See below:
mygrid._b_processing=function(a,ind,rind){
var c=0,j=0;
//put editor in cache, so it can be used for custom html containers - can be moved in cells5(?)
if (!this._ecache[this.cellType[ind]]) this.cells5({parentNode:{grid:this}},this.cellType[ind]);
for (var i=this.rowsCol.length-1; i>=0; i–){
if (!this.rowsCol[i]._cntr){
c=a(c,this.cells3(this.rowsCol[i],ind).getValue().replace(/,/, “”)*1,j);
j++;
} else {
this.cells5(this.rowsCol[i].childNodes[rind],this.cellType[ind]).setValue©;
j=c=0;
}
}
}
As alternative solution you can try to use ron or edn column types. Both allows to use custom formats for the data ( including comma as decimal separator ) but in same time both provides valid numbers as cell value for API calls, so stat_total will work for them correctly without extra modifications.