set like this : math:[$r,:2]+[$r,:4] ,becase a col is divided into two cols,I need the divided data, it does not work.
{ id:“year”, header:[{text:“sum”, colspan:2}, “2014”] , math:"[$r,:2] + [$r,:4]",width:80 ,tooltip: “”, editor:“text”}
columns:[
{ id:"region", header:"", width:100 },
{ id:"title", header:"" ,width:100},
{ id:"year", header:[{text:"s", colspan:2}, "2014"] , width:80 ,tooltip: "", editor:"text"},
{ id:"year", header:[null, "2015"] },
{ id:"year", header:[{text:"a", colspan:2}, "2014"] , width:80 ,tooltip: "", editor:"text"},
{ id:"year", header:[null, "2015"] },
{ id:"year", header:[{text:"b", colspan:2}, "2014"] , width:80 ,tooltip: "", editor:"text"},
{ id:"year", header:[null, "2015"] },
{ id:"year", header:[{text:"sum", colspan:2}, "2014"] , math:"[$r,:2] - [$r,exp]",width:80 ,tooltip: "", editor:"text"},
{ id:"year", header:[null, "2015"] }
]
thank you very much,the problem :
http://webix.com/snippet/e9da0040
thanks .
Colspans do not affect math calculation:
http://webix.com/snippet/21eec48a
However, math calculation does not consider “template” output:
http://webix.com/snippet/b51bc0b1
So, there should be a value in datasource. If you need to calculate template results, built-in math calculation does not fit - you can use template and use custom calculation.