Using fnFilter with sAjaxSource?
Using fnFilter with sAjaxSource?
I'm trying to use fnFilter to filter a column and also use sAjaxSource. A discussion page I came across (can't seem to find it now) says that sAjaxSource by default sets bFilter to false and I'm guessing that is why I am having issues?
If I try to use fnFilter with the code below I get the error:
[quote]Uncaught TypeError: Cannot read property 'oFeatures' of null[/quote]
[code]
$(document).ready(function(){
var oTable = $('#datables').dataTable();
$('#datatables').dataTable({
"bJQueryUI": true,
"sPaginationType":"full_numbers",
"iDisplayLength":50,
"bFilter": true,
"sAjaxSource": "json.php",
"bProcessing": true,
"bServerSide": true,
});
oTable.fnFilter('string',3)
})
[/code]
I am using the example server side processing script here: http://datatables.net/examples/data_sources/server_side.html
Do I need to be using fnServerData in combination with sAjaxSource in order to use fnFilter? I'd appreciate any help.
Thanks!
If I try to use fnFilter with the code below I get the error:
[quote]Uncaught TypeError: Cannot read property 'oFeatures' of null[/quote]
[code]
$(document).ready(function(){
var oTable = $('#datables').dataTable();
$('#datatables').dataTable({
"bJQueryUI": true,
"sPaginationType":"full_numbers",
"iDisplayLength":50,
"bFilter": true,
"sAjaxSource": "json.php",
"bProcessing": true,
"bServerSide": true,
});
oTable.fnFilter('string',3)
})
[/code]
I am using the example server side processing script here: http://datatables.net/examples/data_sources/server_side.html
Do I need to be using fnServerData in combination with sAjaxSource in order to use fnFilter? I'd appreciate any help.
Thanks!
This discussion has been closed.
Replies
[code]
$(document).ready(function(){
var oTable = $('#datatables').dataTable({
"bJQueryUI": true,
"sPaginationType":"full_numbers",
"iDisplayLength":50,
"bFilter": true,
"sAjaxSource": "json.php",
"bProcessing": true,
"bServerSide": true,
});
oTable.fnFilter('string',3)
})
[/code]