dongshan7060 2014-04-01 08:57
浏览 215
已采纳

如何在jQuery中使用jQgrid的editUrl属性

I have been trying to implement edit/add of rows in jqgrid dynamically but stuck at place with editUrl attribute. Can somebody tell me that

1) Where to keep this php file, in server or in our applcation?

2) I am using like editurl: './data_save.php', and I have this file in my application, next to my jsp file. But on submit, I am getting 'error Status: 'Not Found'. Error code: 404' on top of popup window and on console I am getting, no mapping found for request with URI [/myapp/some.php] in distacherservlet with name 'myApp'.

Any idea?

Update :- I also tried using, editurl:'/some.jsp' and when I create on controller(expecting this url) in my Spring MVC Controller class then I do not get message at console saying, "no mapping found for request with URI [/myapp/some.php] in distacherservlet with name 'myApp'"

  • 写回答

1条回答 默认 最新

  • doudao7113 2014-04-04 11:03
    关注

    Use your application name

    editUrl:'WhatEverYourApplicationNameIs/data_save.php'
    

    Update1:

    editUrl:'@Url.Action("ActionName","ControllerName")'
    

    Update2:

    If your edit method is like below

    public .. MyEditMethod()
    {
    //Add logic
    }
    

    then your editUrl will be

    editUrl:'@Url.Action("MyEditMethod","WhatEverYourControllecNameIs")'
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog