handsontable formula returning #NEED_UPDATE

2019-08-15 07:29发布

I have a handsontable, for example:

+---+------+-------+-------+
|   |  A   |  B    |  C    | 
+---+------+-------+-------+
| 1 |  10  | 20    |  30   |
+---+------+-------+-------+
| 2 |  5   |=0.5+A3|=0.5+B3|
+---+------+-------+-------+
| 3 |=A1+A2|=B1+B2 |=C1+C2 |
+---+------+-------+-------+

when the table is loaded, B2 and C2 has value of #NEED_UPDATE instead of calculation result of its formula. how to handle this issue?

1条回答
祖国的老花朵
2楼-- · 2019-08-15 08:05

Nevermind, I solved this. add afterRender callback:

afterRender: function(){
    this.setDataAtCell(ROW, COL, FORMULA);
}

this will automatically update all cell to the right.

查看更多
登录 后发表回答