我有一个服务器端分页的数据表。我将其中一个字段设置为变为超链接。当我输入过滤器框时,它不会包含该列的结果。这是我的DT初始化。
$("#EPLogTable").dataTable({
"serverSide" : true,
"processing" : true,
"ajax" : "serverSideProcessingAllLogs.php",
"aoColumns" : [
{"sName" : "Date"},
{"sTitle" : "App Name"},
{"sTitle" : "Page Name"},
{"sTitle" : "AppName"},
{"mData" : null, "mRender" : function(data, type, full){
if(data[4] != null){
return "<a href='userGraph.php?uid="+data[4]+"'>"+data[4]+"</a>";
}else{
return "";
}
}}
]
});
有没有办法可以按该列过滤?
答案 0 :(得分:0)
$("#EPLogTable").dataTable({
"serverSide" : true,
"processing" : true,
"ajax" : "serverSideProcessingAllLogs.php",
"aoColumns" : [
{"bSearchable": false }, //
{"sName" : "Date"},
{"sTitle" : "App Name"},
{"sTitle" : "Page Name"},
{"sTitle" : "AppName"},
{"mData" : null, "mRender" : function(data, type, full){
if(data[4] != null){
return "<a href='userGraph.php?uid="+data[4]+"'>"+data[4]+"</a>";
}else{
return "";
}
}}
]
});
读这个:) http://legacy.datatables.net/usage/columns 'bSearchable'