久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  1. <legend id='6Yz2s'><style id='6Yz2s'><dir id='6Yz2s'><q id='6Yz2s'></q></dir></style></legend>

      <tfoot id='6Yz2s'></tfoot>
      <i id='6Yz2s'><tr id='6Yz2s'><dt id='6Yz2s'><q id='6Yz2s'><span id='6Yz2s'><b id='6Yz2s'><form id='6Yz2s'><ins id='6Yz2s'></ins><ul id='6Yz2s'></ul><sub id='6Yz2s'></sub></form><legend id='6Yz2s'></legend><bdo id='6Yz2s'><pre id='6Yz2s'><center id='6Yz2s'></center></pre></bdo></b><th id='6Yz2s'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='6Yz2s'><tfoot id='6Yz2s'></tfoot><dl id='6Yz2s'><fieldset id='6Yz2s'></fieldset></dl></div>
        <bdo id='6Yz2s'></bdo><ul id='6Yz2s'></ul>
    1. <small id='6Yz2s'></small><noframes id='6Yz2s'>

      jqGrid 刪除一行

      jqGrid Delete a Row(jqGrid 刪除一行)

    2. <i id='MWvUS'><tr id='MWvUS'><dt id='MWvUS'><q id='MWvUS'><span id='MWvUS'><b id='MWvUS'><form id='MWvUS'><ins id='MWvUS'></ins><ul id='MWvUS'></ul><sub id='MWvUS'></sub></form><legend id='MWvUS'></legend><bdo id='MWvUS'><pre id='MWvUS'><center id='MWvUS'></center></pre></bdo></b><th id='MWvUS'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='MWvUS'><tfoot id='MWvUS'></tfoot><dl id='MWvUS'><fieldset id='MWvUS'></fieldset></dl></div>
        <legend id='MWvUS'><style id='MWvUS'><dir id='MWvUS'><q id='MWvUS'></q></dir></style></legend>

        • <small id='MWvUS'></small><noframes id='MWvUS'>

            <tbody id='MWvUS'></tbody>
            • <tfoot id='MWvUS'></tfoot>
                <bdo id='MWvUS'></bdo><ul id='MWvUS'></ul>
                本文介紹了jqGrid 刪除一行的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我已經創建了我的網格,并希望使用網格的默認行為來刪除一行.

                I have created my grid and would like to use default behaviour of the grid to delete a row.

                這是我的網格設置代碼:

                This is my grid setup code:

                $("#grid").jqGrid('navGrid', '#grid_pager',
                    { add: true, addtitle: 'Add Customer', 
                      edit: true, edittitle: 'Edit Customer',
                      del: true, deltitle: 'Delete Customer', 
                      refresh: true, refreshtitle: 'Refresh data',
                      search: true, searchtitle: 'Advanced search filters', 
                      addfunc: addReferent, editfunc: editReferent
                    },
                    {}, // default settings for edit
                    {}, // default settings for add
                    { // define settings for Delete 
                        mtype: "post", 
                        reloadAfterSubmit: true,
                        url: wsBaseUrl + 'CustomerService.asmx/DeleteCustomer',
                        resize: false,
                        serializeDelData: function(postdata) {
                            return JSON.stringify({ customerID: postdata.id });
                        }
                    },
                    { // define settings for search
                        closeOnEscape: true, multipleSearch: true, closeAfterSearch: true 
                    }, 
                    {}
                );
                

                這是在服務器上定義的網絡服務方法

                and this is the web service method defined on the server

                [WebMethod]
                public OperationResult Deletecustomer(string customerID)
                {
                }
                

                但不幸的是,當我單擊刪除按鈕并在確認窗口上單擊確定時,我收到一條錯誤消息 404.如下圖所示

                but unfortunately when I click the delete button and click ok on the confirm window I get an error saying 404. as in the following picture

                我做錯了什么?

                我已將以下代碼添加到我的 jqGrid 初始化中

                I have added the following code to my jqGrid Initialization

                // Set defaults value for jqGrid
                $.jgrid.defaults = $.extend($.jgrid.defaults, {
                    mtype: 'post',
                    datatype: 'json',
                    jsonReader: {
                        root: "d.Rows",
                        page: "d.Page",
                        total: "d.Total",
                        records: "d.Records",
                        repeatitems: false,
                        userdata: "d.UserData",
                        id: "Id"
                    },
                    ajaxGridOptions: { contentType: 'application/json; charset=utf-8' },
                    serializeGridData: function (postData) {
                        return JSON.stringify(postData);
                    },
                    ajaxDelOptions: { contentType: 'application/json; charset=utf-8' },
                    serializeDelData: function (postData) {
                        return JSON.stringify(postData);
                    },
                    loadui: "block",
                    multiboxonly: true,
                    rowNum: 25,
                    rowList: [25, 50, 100],
                    altRows: true,
                    altclass: 'ui-priority-secondary',
                    autoencode: true,
                    autowidth: true,
                    rownumbers: true,
                    rownumWidth: 30,
                    gridview: true,
                    hoverrows: true,
                    viewrecords: true
                });
                

                但我仍然遇到同樣的錯誤...

                but I still get the same error...

                推薦答案

                也許你應該只使用 JSON.stringify (來自 json2.js) 在 serializeDelData 內.您沒有發布您需要刪除的網絡方法 DeleteCustomer 的原型,但您的問題可能可以通過以下代碼解決:

                Probably you should just use JSON.stringify (from json2.js) inside of serializeDelData. You don't posted the prototype of your web method DeleteCustomer which you need to delete, but probably your problem could be fixed with the following code:

                serializeDelData: function(postdata) {
                    return JSON.stringify({customerID: postdata.id});
                }
                

                使用 ASMX 服務時的另一個常見問題.可能需要定義調用的 Web 方法的所有參數(參見 這里一個例子).

                One more common problem in case of the usage of ASMX services. It can be need to define all parameters of the web method called (see here an example).

                ajaxDelOptions: { contentType: "application/json" } 參數的用法也大多是必需的.

                The usage of ajaxDelOptions: { contentType: "application/json" } parameter is also required mostly.

                使用 Fiddler 或 Firebug 來捕獲和分析 HTTP 流量.

                It can be helpful to use Fiddler or Firebug to capture and analyse the HTTP traffic.

                這篇關于jqGrid 刪除一行的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                GoogleWebAuthorizationBroker in MVC For Google Drive Access(MVC 中的 GoogleWebAuthorizationBroker 用于 Google Drive 訪問)
                Why do I get System.UnauthorizedAccessException Access to the path #39;Google.Apis.Auth#39; is denied(為什么我得到 System.UnauthorizedAccessException 對路徑“Google.Apis.Auth的訪問被拒絕) - IT屋-程序員軟件開發技術分享
                Dynamically built SiteMapPath in asp.net(在 asp.net 中動態構建的 SiteMapPath)
                ASP.NET Exception: The remote name could not be resolved: #39;apiconnector.com#39;(ASP.NET 異常:無法解析遠程名稱:“apiconnector.com)
                Does a MasterPage know what page is being displayed?(MasterPage 是否知道正在顯示的頁面?)
                ASP.net MVC - Navigation and highlighting the quot;currentquot; link(ASP.net MVC - 導航和突出顯示“當前;關聯)
                    <tbody id='JmkC9'></tbody>
                  <i id='JmkC9'><tr id='JmkC9'><dt id='JmkC9'><q id='JmkC9'><span id='JmkC9'><b id='JmkC9'><form id='JmkC9'><ins id='JmkC9'></ins><ul id='JmkC9'></ul><sub id='JmkC9'></sub></form><legend id='JmkC9'></legend><bdo id='JmkC9'><pre id='JmkC9'><center id='JmkC9'></center></pre></bdo></b><th id='JmkC9'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='JmkC9'><tfoot id='JmkC9'></tfoot><dl id='JmkC9'><fieldset id='JmkC9'></fieldset></dl></div>
                  <legend id='JmkC9'><style id='JmkC9'><dir id='JmkC9'><q id='JmkC9'></q></dir></style></legend>

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

                    <tfoot id='JmkC9'></tfoot>

                        <bdo id='JmkC9'></bdo><ul id='JmkC9'></ul>
                          主站蜘蛛池模板: 伊人网国产| 国产成年人视频 | 久久久久黄 | 欧美片网站免费 | 超黄毛片 | 丝袜一区二区三区 | 情侣av | av男人的天堂av | 精品久久国产老人久久综合 | 日韩精品在线免费 | 日韩久久久久久 | 99精品欧美一区二区三区综合在线 | 国产午夜av片 | 成人欧美一区二区三区黑人孕妇 | 视频一二三区 | 性色视频 | 国产精品久久久久久久免费观看 | 久久aⅴ乱码一区二区三区 91综合网 | 激情视频中文字幕 | 99在线国产| 精品精品视频 | 成人精品视频 | 欧美激情亚洲天堂 | 亚洲激情视频在线 | 蜜桃视频成人 | 久久99精品视频 | 91视频在线 | 欧美久久精品一级c片 | 在线播放国产一区二区三区 | 国产一级免费视频 | 天天操夜夜艹 | 亚洲精品免费在线观看 | 午夜理伦三级理论三级在线观看 | 午夜视频在线免费观看 | 日韩成人在线播放 | 97超碰人人 | 中文字幕日韩一区 | 久久久片 | 青春草在线| 成年人在线观看 | 男人的天堂在线视频 |