"searchCols" does not work for me:
"searchCols" does not work for me:
nelsonvelazquez
Posts: 5Questions: 3Answers: 0
Hello, thanks in advance for helping me. I used the code that you sent me, but I can't get it to work. I send the code that I use according to the interpreter. Please help me.
the table has 7 columns and i want to filter or search by initializing on column 0
<script>
jQuery(document).ready(function() {
var table = $('.example-table').DataTable( {
dom: '<"top"i>rt<"bottom"flp><"clear">',
language: {
},
order: [[6, 'Dasc']],
"paging": false,
"info": false,
"searchCols": [
null,
{ "search": "101" },
null,
{ "search": [0], "regex": true }
{ "search": [1], "regex": false }
{ "search": [2], "regex": false }
{ "search": [3], "regex": false }
{ "search": [4], "regex": false }
{ "search": [5], "regex": false }
{ "search": [6], "regex": false }
]
} );
} );
</script>
Edited by Kevin: Syntax highlighting. Details on how to highlight code using markdown can be found in this guide
This question has an accepted answers - jump to answer
Answers
See this example for searching in column 0:
https://live.datatables.net/mudogofa/1/edit
If you still need help please provide a test case showing the issue you are having.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
yes thanks very much now is working