在编辑时更新JQgrid中的GroupSummary行 [英] Updating GroupSummary Row in JQgrid on Editing
问题描述
我们正在使用一个应用了3级分组的JQgrid.当我们第一次加载网格时,列总和被成功汇总. 我们需要在行中执行内联编辑,并希望使用新添加的值来更新组摘要行.我们尝试在editRow方法的aftersavefunc上重新加载网格,但是它正在用服务器数据替换网格数据. 编辑行时,有没有一种方法可以刷新组摘要"行数据.
We are having a JQgrid with 3 level grouping applied. When we load the grid for the first time the column sum is getting rolled up successfully. We need to perform inline edit in the row and want the Group summary rows to get updated with the new value added. We have tried reloading the grid on aftersavefunc of editRow method but it is replacing the grid data with the server data. Is there a way we can refresh the Group summary row data when row is edited.
谢谢.
推荐答案
例如,可以在嵌入式编辑结束后重新加载网格.
You can, for example, reload the grid after the end of inline editing.
inlineEditing: {
keys: true,
aftersavefunc: function () {
var $self = $(this);
setTimeout(function () {
$self.trigger("reloadGrid");
}, 0);
}
}
建议在免费jqGrid中使用inlineEditing
选项设置内联编辑选项.参见 https://jsfiddle.net/oyavoe00/2/
It's recommended to use inlineEditing
option in free jqGrid to set inline editing option. See https://jsfiddle.net/oyavoe00/2/
这篇关于在编辑时更新JQgrid中的GroupSummary行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!