初始化后数据表滚动插件未加载数据

loading...


0

我正在使用数据表1.10.19,当数据表初始化时,它第一次加载数据,但是当我向下滚动到底部请求时不会进入服务器 .

这是我用来初始化datatable的代码 .

`function initializeActiveTable(loadAll){

$('#activeDataTable').DataTable({
    language: {
        search: "_INPUT_",
        searchPlaceholder: "Search..."
    },
    serverSide : true,
    scrollY : "450px",
    deferRender : true,
    scroller : true,
    destroy : true,
    aaSorting: [[0, 'desc']],
    "ajax" : {
        "url" : "url",
        "type" : "POST",
        "data" : function(request) {
            request.region = $('#applyRegion :selected').text();
            request.station = $('#applyStation :selected').text();
            request.fromDate = $('#fromdatepicker').val();
            request.toDate = $('#todatepicker').val();
            request.loadAll = loadAll;
        },
        "error":function(err){

        }
    },
    "dom" : '<f<t>lip>',
    "oLanguage" : {
        "sEmptyTable" : "No request found for current selection.",
        "sSearch" : "Search Records"

    },
    'columnDefs': [
          {
              "targets": 3,
              "className": "text-right",
              "render" : function( data, type, full ) {
                        return formatNumber(data); 
               }
         },
         {
             "targets": [0,6],
              "className": "text-center",

         },
         {
             "targets": [1,2,3,6,7,8],
              "orderable": false,
              "sortable":false

         }]
});
$('input[aria-controls]').attr("placeholder", "Search Records");

}`

loading...

0回答

No Data

评论

暂时没有评论!