<legend id='OdqNF'><style id='OdqNF'><dir id='OdqNF'><q id='OdqNF'></q></dir></style></legend>

      <small id='OdqNF'></small><noframes id='OdqNF'>

      <tfoot id='OdqNF'></tfoot>
      • <bdo id='OdqNF'></bdo><ul id='OdqNF'></ul>
      <i id='OdqNF'><tr id='OdqNF'><dt id='OdqNF'><q id='OdqNF'><span id='OdqNF'><b id='OdqNF'><form id='OdqNF'><ins id='OdqNF'></ins><ul id='OdqNF'></ul><sub id='OdqNF'></sub></form><legend id='OdqNF'></legend><bdo id='OdqNF'><pre id='OdqNF'><center id='OdqNF'></center></pre></bdo></b><th id='OdqNF'></th></span></q></dt></tr></i><div id='OdqNF'><tfoot id='OdqNF'></tfoot><dl id='OdqNF'><fieldset id='OdqNF'></fieldset></dl></div>

      1. 在 jqgrid 中实现删除和编辑操作

        时间:2023-08-02
          <tbody id='UpGCW'></tbody>
          1. <tfoot id='UpGCW'></tfoot>
          2. <small id='UpGCW'></small><noframes id='UpGCW'>

                <bdo id='UpGCW'></bdo><ul id='UpGCW'></ul>
                <i id='UpGCW'><tr id='UpGCW'><dt id='UpGCW'><q id='UpGCW'><span id='UpGCW'><b id='UpGCW'><form id='UpGCW'><ins id='UpGCW'></ins><ul id='UpGCW'></ul><sub id='UpGCW'></sub></form><legend id='UpGCW'></legend><bdo id='UpGCW'><pre id='UpGCW'><center id='UpGCW'></center></pre></bdo></b><th id='UpGCW'></th></span></q></dt></tr></i><div id='UpGCW'><tfoot id='UpGCW'></tfoot><dl id='UpGCW'><fieldset id='UpGCW'></fieldset></dl></div>

                  <legend id='UpGCW'><style id='UpGCW'><dir id='UpGCW'><q id='UpGCW'></q></dir></style></legend>
                1. 本文介绍了在 jqgrid 中实现删除和编辑操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有以下 JQgrid 实现

                  i have the following JQgrid implementation

                      colModel: [
                                  { name: 'NameEn', index: 'NameEn', width: 100, align: 'left' },
                                  { name: 'Desc', index: 'Desc', width: 100, align: 'left' },
                                  { name: 'ID', index: 'ID', width: 100, align: 'left', hidden:true }
                  ],
                      caption: "Management",
                      gridview: true,
                      rownumbers: true,
                      rownumWidth: 40,
                      scroll: 0,
                      rowNum: 100,
                      sortname: 'ID',
                      pager: '#pager',
                      sortorder: "asc",
                      viewrecords: true,
                      autowidth: true,
                      width: '100%',
                      height: '100%',
                      jsonReader: { root: "GridData", page: "CurrentPage", total: "TotalPages", records: "TotalRecords", repeatitems: false, id: "00" }
                  
                  };
                  
                  SectorGrid.prototype.SetupGrid = function (selector) {
                      jQuery(selector).html('<table id="grid"></table><div id="pager"></div>');
                      var grid = jQuery("#grid").jqGrid(this.gridConfiguration);
                  
                      jQuery("#grid").navGrid('#pager',{edit:false,add:false,del:true,search:false})
                  };
                  

                  我想添加删除功能,删除调用带有 url http://localhost/的 web 服务services.svc/sector(id) 和服务只是获取 id 并且它会自己处理所有事情我也想使用不同的 url http://localhost/services.svc/sector 并接收具有上述相同信息的 json 对象.我真的尝试配置它,但它不会工作有人可以帮我在此,如果您在 jqgrid 或自定义按钮中使用了删除选项,但我不想使用 editurl 属性,这并不重要.

                  i want to add a delete functionality, the delete call a webservice with the url http://localhost/services.svc/sector(id) and the service just take the id and it will handle everything by it self also i would like to edit data using differnt url http://localhost/services.svc/sector and this receives json object with the same information above. i really tried to configure it but it wont work can somebody help me in this, it dosent matter if u used the delete option in the jqgrid or custom buttons but i dont want to use the editurl property.

                  请举一个完整的例子如何实现这个继续我上面的代码

                  please put a full example how to implement this continue to my code above

                  更新:休息方法

                  [WebInvoke(UriTemplate = "Sector({iD})/", Method = "DELETE",  ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
                          [OperationContract]
                          bool DeleteSector(string iD)
                  

                  提前致谢

                  推荐答案

                  尝试在表单中使用navGrid

                  jQuery("#grid").jqGrid('navGrid', '#pager',
                      {edit: false, add: false, search: false}, {}, {},
                      { // Delete parameters
                          ajaxDelOptions: { contentType: "application/json" },
                          mtype: "DELETE",
                          serializeDelData: function () {
                              return ""; // don't send and body for the HTTP DELETE
                          },
                          onclickSubmit: function (params, postdata) {
                              params.url = '/Sector(' + encodeURIComponent(postdata) + ')/';
                          }
                      });
                  

                  这篇关于在 jqgrid 中实现删除和编辑操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:引导网格无法使用 xs 列 下一篇:canvas.toDataURLWithMultiplier 不是函数

                  相关文章

                  <legend id='Hz4Ql'><style id='Hz4Ql'><dir id='Hz4Ql'><q id='Hz4Ql'></q></dir></style></legend>
                  • <bdo id='Hz4Ql'></bdo><ul id='Hz4Ql'></ul>

                  <small id='Hz4Ql'></small><noframes id='Hz4Ql'>

                2. <i id='Hz4Ql'><tr id='Hz4Ql'><dt id='Hz4Ql'><q id='Hz4Ql'><span id='Hz4Ql'><b id='Hz4Ql'><form id='Hz4Ql'><ins id='Hz4Ql'></ins><ul id='Hz4Ql'></ul><sub id='Hz4Ql'></sub></form><legend id='Hz4Ql'></legend><bdo id='Hz4Ql'><pre id='Hz4Ql'><center id='Hz4Ql'></center></pre></bdo></b><th id='Hz4Ql'></th></span></q></dt></tr></i><div id='Hz4Ql'><tfoot id='Hz4Ql'></tfoot><dl id='Hz4Ql'><fieldset id='Hz4Ql'></fieldset></dl></div>
                  1. <tfoot id='Hz4Ql'></tfoot>