mRender is not working

mRender is not working

pankajshrpankajshr Posts: 3Questions: 0Answers: 0
edited January 2013 in DataTables 1.9
I have jquery datatable (http://datatables.net) and want to create custom filter which excludes content inside any html select element. Following is the code I have written but its not working:-
[code]
$('.dataTable_exportable').dataTable( {
"sDom": 'Tlfrtip',
"bAutoWidth": true,
"aoColumnDefs": [ { "aTargets": [12], "mRender": function(data, type, full) { return data.replace(/)<[^<]*)*<\/select>/gi, ""); }, "sType": "comments" } ]
});
[/code]

where 12 is the number of column which contains that select boxes starting from 0.

But it still taking the complete content of cell include select html field into search. Can anyone suggest why this code is not working ?

Proof that regex I used in replace is working correctly- jsfiddle.net/QubMc

Replies

  • allanallan Posts: 63,389Questions: 1Answers: 10,449 Site admin
    Please link to a test case, otherwise we don't really stand much of a chance of being able to help or at least use the debugger. See: http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read

    Allan
This discussion has been closed.