2014-12-30 62 views
0

不refreshig這是我如何述說我的DataTable的DataTable服務器端搜索

$('#editable').dataTable({ 
      "processing": true, 
      "serverSide": true, 
      "ajax": "ProjectController.php?getProjectData=1", 

當我在搜索欄中通話熄滅並檢索正確的數據但表不更改類型。 我有什麼設置來糾正這個問題嗎?

返回的JSON是

{ 
 
    "draw": 1, 
 
    "recordsTotal": "2", 
 
    "recordsFiltered": 2, 
 
    "data": [{ 
 
    "id": "1", 
 
    "jobnumber": "", 
 
    "name": "Piek, G D F", 
 
    "erfno": "block 46", 
 
    "address": null, 
 
    "from": null, 
 
    "jobyear": "1995", 
 
    "jobstatus": "Complete", 
 
    "contactinfo": null, 
 
    "datedue": null, 
 
    "datecreated": "2010-06-29 14:38:49", 
 
    "operatorname": null 
 
    }, { 
 
    "id": "63658", 
 
    "jobnumber": "", 
 
    "name": "Piek, G D F", 
 
    "erfno": "block 46", 
 
    "address": null, 
 
    "from": null, 
 
    "jobyear": "1995", 
 
    "jobstatus": "Complete", 
 
    "contactinfo": null, 
 
    "datedue": null, 
 
    "datecreated": "2010-06-29 14:38:49", 
 
    "operatorname": null 
 
    }] 
 
}

+0

你檢查什麼被阻止返回你的來電? – Sefa

+0

是的,它正在返回正確的數據 – Jed

+0

你確定它正在返回_filtered_數據嗎?如果它實際上沒有過濾,那麼它看起來像表沒有改變。 – markpsmith

回答

0

得到它,你需要增加在JSON平局計您發送回表

相關問題