0

我已经按照下面的教程

http://www.codeproject.com/Articles/155422/jQuery-DataTables-and-ASP-NET-MVC-Integration-Part

但奇怪的是,每次向服务器开火,它都会返回 3 个相同的响应,相同的数据,但来自服务器的 encho 不同,这是正常行为吗?但它只会减慢几条记录的表处理速度,知道吗?

jQuery

var _bspaging = new bspaging();
            _bspaging.Render();
            self.$('#tblticket').dataTable({
                "bDestroy": true,
                "bServerSide": true,
                "sPaginationType": "bootstrap",
                "sDom": '<"top"flp<"clear">>rt<"bottom"ip<"clear">>',
                "bSortable": true,
                "bAutoWidth": false,
                "sAjaxSource": '/Home/Ticket/AjaxHandler',
                "fnServerParams": function (aoData) {
                    aoData.push({ "name": "sStatus", "value": status });
                },
                "bProcessing": true,
                "aoColumns": [
                    { "sTitle": "Status" },
                    { "sTitle": "Ticket Date", "sWidth": "10%" },
                    { "sTitle": "Ticket No.", "sWidth": "10%" },
                    { "sTitle": "Title", "sWidth": "30%" },
                    { "sTitle": "Category", "sWidth": "10%" },
                    { "sTitle": "Item", "sWidth": "10%" },
                    { "sTitle": "Created By", "sWidth": "10%" },
                    { "sTitle": "Current", "sWidth": "10%" },
                    {
                        "sName": "ID",
                        "sDefaultContent": "",
                        "sWidth": "10%",
                        "fnRender": function (obj) {
                            if (status == "New") {
                                return "<a class='btn btn-large'><i class=\"icon icon-pencil\"></i> Edit</a>";
                            }
                        },
                    }
                ]
            })

在此处输入图像描述

4

1 回答 1

0

好的,我想我错了,我找到了导致我的 jquery 数据表从服务器返回多个响应的罪魁祸首,而不是“bprocessing”,我发现 RowGrouping 插件导致我的数据表从服务器返回多个响应

于 2013-08-30T01:10:42.390 回答