【问题标题】:Error when using jqGrid getChangedCell method使用 jqGrid getChangedCell 方法时出错
【发布时间】:2012-11-08 17:58:28
【问题描述】:

我正在使用包含 grid.base.js 的 jqGrid 4.3.2; jquery.fmatter.js;网格.custom.js;网格.common.js; grid.jqueryui.js 模块。

调用getChangedCells方法时

var modified = $("tableau").jqGrid('getChangedCells', 'all');

我遇到了这个错误:

未捕获的 jqGrid - 没有这样的方法:getChangedCells

我是否需要其他模块才能使其正常工作?

【问题讨论】:

    标签: jquery jqgrid struts2


    【解决方案1】:

    我不确定我是否理解您的工作。如果您遇到"No such method" 之类的错误,您应该按照您使用的确切顺序包含 JavaScript 文件的完整列表。方法getChangedCellsgrid.celledit.js 模块中定义(参见here)。好像没有加载模块。

    【讨论】:

    • 实际上我在我的jsp页面上使用struts2-jquery plugin taglib<%@ taglib prefix="sjg" uri="/struts-jquery-grid-tags"%>我不知道他是否导入了所有必需的模块,但是通过在FireBug上调试,我发现导入的js文件只包含模块:grid.base.js; jquery.fmatter.js;网格.custom.js;网格.common.js;有办法让truts2-jquery 插件导入grid.celledit.js 还是我必须自己做?
    • @user1810097:我自己不使用struts2-jquery插件,不知道它是如何工作的,它加载了哪些模块以及为什么,但如果它使用jqGrid的原始代码,你应该能够看到在调试器中。就像我之前写的 getChangedCells 仅在您使用单元格编辑时才有效。您是否将 jqGrid 的 cellEdit 选项设置为 true
    • 即使添加grid.celledit.js 并将cellEdit 设置为true,它仍然无法正常工作
    • @user1810097:您应该将问题提交给struts2 专家。我在您的问题中添加了相应的标签。
    • @Oleg:getChangedCells() 方法是否也适用于表单编辑?还是仅限于内联和单元格编辑?
    猜你喜欢
    • 1970-01-01
    • 2015-03-06
    • 2010-12-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-27
    相关资源
    最近更新 更多