using sType to exclude tag content with ColumnFilterWidgets

using sType to exclude tag content with ColumnFilterWidgets

canopuscanopus Posts: 7Questions: 0Answers: 0
edited November 2012 in Plug-ins
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]

Replies

  • canopuscanopus Posts: 7Questions: 0Answers: 0
    an example of something i tried was to add:

    [code]

    "aoColumnDefs": [{"sType": "html", "aiTargets":[0]}]

    [/code]
    at line 15 in the above code. column 0 having links in it.
  • allanallan Posts: 63,213Questions: 1Answers: 10,415 Site admin
    edited November 2012
    Unfortunately this is a bug in DataTables 1.9.4. See this thread: http://datatables.net/forums/discussion/12628/ignoring-html-when-filtering-not-working#Item_2

    Allan
This discussion has been closed.