服务器端处理数据表中未加载表体



我从json得到的结果显示在服务器端的表中,结果如下:

[iTotalDisplayRecords:1, iTotalRecords:1, aaData:[[Mobile Number:98376437, Telephone Number:232323, ], sEcho:1]

将数据加载到表中的功能是:

studentListTable = $("#serverSideTableStdList").dataTable({
              "bDeferRender": true,
              "bProcessing": true,
              sAjaxSource:'<g:createLink url="[action:'loadTableDataForServerSide',controller:'student']" />',
              "aoColumns":[
                  {"mData": "TelephoneNumber", "bVisible": true},
                  {"mData": "MobileNumber", "bVisible": true}
              ] ,
              "oLanguage": {
                  "sEmptyTable": "",
                  "sSearch": "Search all columns:",
                  "sProcessing": "test"
              },
              bServerSide: true,
              sServerMethod: "POST",
              "aLengthMenu": [
                  [10, 50, 1000, 5000, -1],
                  [10, 50, 1000, 5000, 10000]
              ],
              "iDisplayLength":10,
              "fnServerData":function(sSource, aoData, fnCallback){
                  aoData.push( { "name": "unit", "value": unit } );
                  aoData.push( { "name": "shift", "value": shift } );
                  aoData.push( { "name": "batch", "value": batch } );
                  aoData.push( { "name": "stdName", "value": name } );
                  $.ajax( {
                      "dataType": 'json',                         
                      "url": sSource,
                      "data": aoData
                  } );
              },
              "fnDrawCallback": function(){
                  alert(111)
              }

但是表体没有加载,并且在fnDrawCallback功能中没有看到警报完成,请帮助

现在完成了,我错过了ajax函数中的"success":fncallback

最新更新