Hi Alan,
I used the DataTables Debug BookMarklet to upload my datatables and the debug code is 'olohos'.
My issue is, the OR operator '|' or even '||' with string values to filter a column doesn't work in my web application.
For example, if I have the code below
$('.search_init').keyup(function()
{
var asEscapedFilters = [];
asEscapedFilters[0] = $(this).val();
asEscapedFilters[1] = 'Y';
oTable.fnFilter(asEscapedFilters[0] | asEscapedFilters[1], $('#example tr.inputs input').index(this), true, false);
});
And input the string 'I' in the search area for the 'Order Active' column, it is supposed to return all the rows which contains either 'I' or 'Y' for the 'Order Active' column. Instead it returns zero rows.
If I use '||' instead of '|' like the below,
$('.search_init').keyup(function()
{
var asEscapedFilters = [];
asEscapedFilters[0] = $(this).val();
asEscapedFilters[1] = 'Y';
oTable.fnFilter(asEscapedFilters[0] || asEscapedFilters[1], $('#example tr.inputs input').index(this), true, false);
});
It returns the rows which have 'Y' for the 'Order Active' column, but not the rows with 'I'.
I have already spent a lot of time, looking at this issue, any useful suggestions to get this work is very much appreciated.
The processing is server side, does it requires it to take care of any additional syntax or settings for this?
Many thanks in advance,
Vaasugi.
I used the DataTables Debug BookMarklet to upload my datatables and the debug code is 'olohos'.
My issue is, the OR operator '|' or even '||' with string values to filter a column doesn't work in my web application.
For example, if I have the code below
$('.search_init').keyup(function()
{
var asEscapedFilters = [];
asEscapedFilters[0] = $(this).val();
asEscapedFilters[1] = 'Y';
oTable.fnFilter(asEscapedFilters[0] | asEscapedFilters[1], $('#example tr.inputs input').index(this), true, false);
});
And input the string 'I' in the search area for the 'Order Active' column, it is supposed to return all the rows which contains either 'I' or 'Y' for the 'Order Active' column. Instead it returns zero rows.
If I use '||' instead of '|' like the below,
$('.search_init').keyup(function()
{
var asEscapedFilters = [];
asEscapedFilters[0] = $(this).val();
asEscapedFilters[1] = 'Y';
oTable.fnFilter(asEscapedFilters[0] || asEscapedFilters[1], $('#example tr.inputs input').index(this), true, false);
});
It returns the rows which have 'Y' for the 'Order Active' column, but not the rows with 'I'.
I have already spent a lot of time, looking at this issue, any useful suggestions to get this work is very much appreciated.
The processing is server side, does it requires it to take care of any additional syntax or settings for this?
Many thanks in advance,
Vaasugi.