6
我在使用DataTables和pipelining。除非我嘗試輸入額外的列來保存「編輯」鏈接,否則我工作得很好。見表this表。DataTables,Ajax流水線
這裏是server_processing.php的顯示列的片段:
/* Array of database columns which should be read and sent back to DataTables.
* Use a space where you want to insert a
* non-database field (for example a counter or static image)
*/
$aColumns = array('user','email',);
這裏是客戶方:
$(document).ready(function(){
$('#example').dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "scripts/server_processing.php",
"fnServerData": fnDataTablesPipeline,
aoColumns: [null, null, {"bSortable": false}]
}).makeEditable({
sUpdateURL: "UpdateData.php",
sAddURL: "AddData.php",
sAddHttpMethod: "POST",
sDeleteURL: "DeleteData.php",
sDeleteHttpMethod: "POST",
aoColumns: [ { } , { } , null ]
});
});
那麼,爲什麼不是這方面的工作?
我與數據表的經驗不包括使用流水線,但添加了「虛擬列時「 - 例如,編輯列,複選框,計算行,通常您需要在」aoColumns「數組中添加一個佔位符。所以我會將'aoColumns:[null,null,{「bSortable」:false}] aoColumns:[null,null,{「bSortable」:false}]更改爲'aoColumns:[null,null,null,{「bSortable 「:false}]' – artlung
另外,寫數據表的人(Alan Jardine,我認爲?)在幫助你時有很大的幫助,如果你有任何問題的話。他很聰明,顯然沒有人知道這個插件比創作者本身更好! – martincarlin87