0
我试图在更新和插入某些操作后重新加载数据表。第一列是固定的专栏,如果我使用固定的列代码,数据表不重装,请谁能告诉我如何避免冲突,这里是我的代码:数据表不在数据表中的固定列声明后重新加载
$(document).ready(function() {
var datetime = $.now();
table=$('#ReportTable').dataTable({
"bProcessing": true,
"bDestroy": true,
"bPaginate": false,
"bJQueryUI": true,
"sScrollX": "100%", //This is what made my columns increase in size.
"sDom": '<"H"TClr>t<"F"ip>',
"oTableTools":
{
"sSwfPath": "/itmsmaps/htdocs/copy_csv_xls_pdf.swf",
"aButtons": [
{
"sExtends": "xls",
"mColumns": [ 0, 1, 2, 3,4,5,6,7],
"sFileName": "MAPSResults - "+datetime+".csv"
},
]
},
"ajax" :{
url: 'ajax_call.php',
type: "POST",
data: {
action:'loadData'
}
},
"columnDefs": [
{
"mData": null,
"bSortable": false,
"mRender": function(data, type, full)
{
id=full[8];
var returnval = "<td><div class='main'><div class='panel'><a href=#join_form id='join_pop' onclick=\"addData('"+id+"','edit');\">Edit</a></div></div>";
returnval += "<div class='main'><div class='panel'><a href=#join_form id='join_pop' onClick=\"deleteData('"+id+"');\">Delete</a></div></div></td>";
return returnval;
},
"aTargets":8 // this your column of action
}
]
});
new $.fn.dataTable.FixedColumns(table, {
leftColumns: 1
});
});
}
你确定fixedcolumns与v1.9兼容吗? – markpsmith 2014-12-02 14:48:58
我已经使用了这些文件: – user3829086 2014-12-02 14:50:39