problem with fnFilter
problem with fnFilter
Hi everyone,
I'm using DataTables to show a set of rows coming from a datatable.
It's all correctly working.
I want to filter the table using and exact id match.
I want to show only the records with the id=11 (not 117 or 118, so just 11)
I think I'm having some understanding problems with the fnFilter and the regular expression.
I'm using:
[code]$(document).ready(function() {
var myTable = $('#dt_llistat').dataTable( {
...
...
...
} );
myTable.fnFilter("^\\s*"+'11'+"\\s*$",10,true,true);[/code]
/* I want to show only the db registers which have id=11 (secondary key), the id column is (10) */
I did'nt attach full source code because it's correctly working if I don't use [code]myTable.fnFilter("^\\s*"+'11'+"\\s*$",10,true,true);[/code]
Is it the regular expression correctly defined?
Thanks in advance
Ricard
I'm using DataTables to show a set of rows coming from a datatable.
It's all correctly working.
I want to filter the table using and exact id match.
I want to show only the records with the id=11 (not 117 or 118, so just 11)
I think I'm having some understanding problems with the fnFilter and the regular expression.
I'm using:
[code]$(document).ready(function() {
var myTable = $('#dt_llistat').dataTable( {
...
...
...
} );
myTable.fnFilter("^\\s*"+'11'+"\\s*$",10,true,true);[/code]
/* I want to show only the db registers which have id=11 (secondary key), the id column is (10) */
I did'nt attach full source code because it's correctly working if I don't use [code]myTable.fnFilter("^\\s*"+'11'+"\\s*$",10,true,true);[/code]
Is it the regular expression correctly defined?
Thanks in advance
Ricard
This discussion has been closed.