using sType to exclude tag content with ColumnFilterWidgets
using sType to exclude tag content with ColumnFilterWidgets
Hi All,
Thanks for a great tool.
Currently, I'm using DataTables with the ColumnFilterWidger.
When I use the search box filter to narrow down my results, the HTML links embedded in one of my columns are caught by the search filter. I would prefer not to exclude the text content of the column from the search filter, just the tag content. I tried introducing some sType solutions into the code below but to no avail. Any ideas?
Thanks in advance.
[code]
$(document).ready( function () {
$('#rules_table').dataTable( {
/* "sDom": 'TW<"clear">lfrtip', */
"sDom": '<"clear">WT<"clear">lfrtip<"clear">',
"oTableTools": {
"sSwfPath": "/tools/organizer/static/js/DataTables-1.9.4/extras/TableTools/media/swf/copy_csv_xls_pdf.swf",
"aButtons": [ "copy", "xls", "pdf", "print" ]
},
"oColumnFilterWidgets": {
"aiExclude": [0,1,6,9,10,11],
"sSeparator": "\\s*,+\\s*",
},
"sPaginationType": "full_numbers",
"sScrollY": '300px',
} );
/* $("div.toolbar").html('Custom tool bar! Text/images etc.'); */
} );
[/code]
Thanks for a great tool.
Currently, I'm using DataTables with the ColumnFilterWidger.
When I use the search box filter to narrow down my results, the HTML links embedded in one of my columns are caught by the search filter. I would prefer not to exclude the text content of the column from the search filter, just the tag content. I tried introducing some sType solutions into the code below but to no avail. Any ideas?
Thanks in advance.
[code]
$(document).ready( function () {
$('#rules_table').dataTable( {
/* "sDom": 'TW<"clear">lfrtip', */
"sDom": '<"clear">WT<"clear">lfrtip<"clear">',
"oTableTools": {
"sSwfPath": "/tools/organizer/static/js/DataTables-1.9.4/extras/TableTools/media/swf/copy_csv_xls_pdf.swf",
"aButtons": [ "copy", "xls", "pdf", "print" ]
},
"oColumnFilterWidgets": {
"aiExclude": [0,1,6,9,10,11],
"sSeparator": "\\s*,+\\s*",
},
"sPaginationType": "full_numbers",
"sScrollY": '300px',
} );
/* $("div.toolbar").html('Custom tool bar! Text/images etc.'); */
} );
[/code]
This discussion has been closed.
Replies
[code]
"aoColumnDefs": [{"sType": "html", "aiTargets":[0]}]
[/code]
at line 15 in the above code. column 0 having links in it.
Allan