如何刷新 jqGrid 中的数据?

2022-01-19 00:00:00 jquery javascript jqgrid

我一直在尝试在按下按钮时从数据源更新网格.

I have been trying to get a grid to be updated from the datasource when a button is pushed.

所以我在点击事件中有这样的东西:

So I have in the click event something like this:

$('#grid').jqGrid('trigger','reloadGrid');

但是这不起作用,我收到未知方法触发器"引发的错误

However this does not work and I get an error thrown for unknown method 'trigger'

我也试过

$('#grid').jqGrid('trigger("reloadGrid")');

我将如何执行此功能?

推荐答案

$('#grid').trigger( 'reloadGrid' );

相关文章