@colin Thanks! It worked! But what if I need also to do columnDefs: [{ targets: 3, render: function (data, type, row){ if (type === 'filter'){ return data.replace(/e/g, 'i'); } return data.replace(); } } ],
I need to merge both, how?
To properly use Markdown place the three back ticks on their own line. One set at the beginning of the code snippet and another at the end. You don't need them on each line. Like this screenshot:
The js is for Javascript formatting. Read more about it here.
Answers
You can disable searching in specific columns with
columns.searchable
- see example here: http://live.datatables.net/bilofufi/1/editColin
@colin Thanks! It worked! But what if I need also to do
columnDefs: [{
targets: 3,
render: function (data, type, row){
if (type === 'filter'){
return data.replace(/e/g, 'i');
}
return data.replace();
}
}
],
I need to merge both, how?
Just add
searchable: false,
like this:To properly use Markdown place the three back ticks on their own line. One set at the beginning of the code snippet and another at the end. You don't need them on each line. Like this screenshot:
The
js
is for Javascript formatting. Read more about it here.Kevin
@kthorngren Nope. That's not what I need. I need target 3 for replace and targets 0,1,4 for searchable false. How can I do that?
Add another object to
columnDefs
like this:Kevin
@kthorngren Perfect! It worked! Thanks!