jquery DataTable Server Side Paging Next Button仅在第一页上工作

时间:2016-04-11 13:34:12

标签: jquery datatables paging

我已经使用了jquery数据表和服务器端分页,它的工作正常。

但是当我点击"下一步"分页页脚中的按钮,仅适用于第一页。从第二页开始,如果我点击"下一步"按钮。

 gDataTable = $(table_id).DataTable({
    "autoWidth": false,
    "iDisplayLength":  getCookieValue("gridLength"),
    "serverSide": true,
    "sAjaxSource": gSvcUrl + qstr + "&rndm=" + Math.random(),
    "fnServerData": function (sSource, aoData, fnCallback, oSettings)
    {
        sSource += "&aaSorting=" + oSettings.aaSorting;
        sSource += "&iDisplayStart=" + aoData[3].value;
        var searchEscaped = escape(oSettings.oPreviousSearch.sSearch);
        sSource += "&sSearch=" + searchEscaped;
        sSource += "&DisplayLength=" + oSettings._iDisplayLength;
        var tloc = gSvcUrl + qstr;
        var param = (params == null) ? null : JSON.stringify(params);

        $("#iframeloading").show();
        var req_start = new Date();
        var req_end;

        oSettings.jqXHR = $.ajax({
            "dataType": 'json',
            "type": "POST",
            "url": sSource,
            "contentType": "application/json; charset=utf-8",
            "data": param,
            "success": function (data, textStatus, request, d) {
             },
             error: function (xhr, textStatus) {

                $("#iframeloading").hide();
                if (callType) {
                    CreateOfflineCallStructure(qstr, params, callType, qid);
                }
                else {
                    ProcessErrorInfo(xhr);
                }
            }
        });

请帮帮我

0 个答案:

没有答案