Math formulas + stat_total + addRow


I get the error: “_locator is null or not and objet” when I addRow to the grid.



g2.addRow(  ind
    ,   ‘value_1’
      + ‘,’  + ‘value_2’
      + ‘,’  + ‘value_3’
      + ‘,’  + ‘’           // this column has stat_total footer, and math formula
      + ‘,’ + ‘value_4’
    , ‘’);



I get NaN in the added row at math formula cell.



The grid inicialization is:



g2.setColTypes(“edn,ron,ron,ron[=c2*c4],ed”);



g2.attachFooter(“Cantidad total,#cspan,#cspan,{#stat_total},”)



Uisng grid: dhtmlxTreeGrid_pro_v16_80512.zip



When I use loadXML, everything work OK, and I get the right value at the math formula column.



Thanks!
  



 



 


The problem caused by using “” as last parameter, if you want to add row at last position, just omit last parameter , or use -1


g2.addRow( ind
, ‘value_1’
+ ‘,’ + ‘value_2’
+ ‘,’ + ‘value_3’
+ ‘,’ + ‘’ // this column has stat_total footer, and math formula
+ ‘,’ + ‘value_4’
, -1);