javascript 如何让 ExtJS 网格重新渲染自身?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7665841/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-26 00:51:35  来源:igfitidea点击:

How to make ExtJS grid to re-render itself?

javascriptextjs

提问by Tower

I have a column rendering for a grid which draws text in bold if certain data holds true. Now when this data changes, I want to call some method on the grid to make it re-render itself. Is there a way to do this?

我有一个网格的列渲染,如果某些数据成立,它会以粗体绘制文本。现在,当这些数据发生变化时,我想在网格上调用一些方法以使其重新呈现。有没有办法做到这一点?

回答by user123444555621

It's as easy as

就这么简单

grid.getView().refresh();