handsontable formula returning #NEED_UPDATE

主宰稳场 提交于 2019-12-13 19:09:48

问题


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:


Nevermind, I solved this. add afterRender callback:

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

this will automatically update all cell to the right.



来源:https://stackoverflow.com/questions/32689923/handsontable-formula-returning-need-update

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!