【问题标题】:jqgrid error when deleting row删除行时出现jqgrid错误
【发布时间】:2012-01-05 04:21:09
【问题描述】:

我在 jquery jqgrid 上做了一些测试,但有问题:

jQuery("#navgrid").jqGrid(
        "navGrid",
        "#pagernav", 
        {}, //options 
        {}, // edit options 
        {}, // add options 
        {
            afterSubmit : function(response, postdata)
            {
                if(response.responseText == 'success')
                {
                    console.log(postdata);
                    alert('success and data should be changed')
                    console.log(postdata.id);
                    jQuery("#navgrid").delRowData(postdata.id);
                }
                else
                {
                    alert('failed and data should not be changed');
                }
                return true;
            },
            reloadAfterSubmit: true
        }, // del options 
        {} // search options 
);

我在firebug上做了两个console.log:

postdata => Object { oper="del", id="29"}
postdata.id => 29

然后我的萤火虫出现这样的错误:

postdata.split is not a function
toarr = postdata.split(","); 

我想我已经遵循了这个方法: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:methods

【问题讨论】:

  • 我在最新的 jqGrid 以及 jQuery 1.6.4 和 1.7.1 中看到了同样的情况。

标签: javascript


【解决方案1】:

看起来 triley 可以在这里解决它:

http://www.trirand.com/blog/?page_id=393/bugs/4-2-0-g-split-is-not-a-function-error/

我尝试了他的修复方法,它有效。

【讨论】:

  • 为我工作,非常好且容易修复。只是希望下一个版本发布后它不会倒退。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-03-22
  • 1970-01-01
  • 2014-01-10
  • 2023-03-14
相关资源
最近更新 更多