dataTable filtering issue
dataTable filtering issue
sia
Posts: 3Questions: 0Answers: 0
I have used the dataTable filtering, sample code below which works fine for the first 10(0-9) data inside the aaData array but it does not render through the rest of column values.
[code]
var oTable = $('#system_parameter_values').dataTable({
"sPaginationType":"full_numbers",
bJQueryUI:true,
bProcessing:true,
bServerSide:true,
//bFilter:true,
sAjaxSource:$('#system_parameter_values').data('source'),
"aoColumnDefs":[
{ "bSortable":false, "aTargets":[2] }
],
"oLanguage": {
"sSearch": "Search all columns:"
},
"fnInitComplete": function() {
$("tfoot th").each( function ( i ) {
this.innerHTML = fnCreateSelect( oTable.fnGetColumnData(i) );
$("select", this).change( function () {
oTable.fnFilter( $(this).val(), i );
} );
} );
}
[/code]
so for example if we have a column which include A-Z alphabet it only render through the first 0-9 which is A to J and ignore the rest of the values.
I can see what the problem is: which is only rendering what it is getting from "oSetting.aiDisplay" .
any help would be appreciated
Thanks in advance.
[code]
var oTable = $('#system_parameter_values').dataTable({
"sPaginationType":"full_numbers",
bJQueryUI:true,
bProcessing:true,
bServerSide:true,
//bFilter:true,
sAjaxSource:$('#system_parameter_values').data('source'),
"aoColumnDefs":[
{ "bSortable":false, "aTargets":[2] }
],
"oLanguage": {
"sSearch": "Search all columns:"
},
"fnInitComplete": function() {
$("tfoot th").each( function ( i ) {
this.innerHTML = fnCreateSelect( oTable.fnGetColumnData(i) );
$("select", this).change( function () {
oTable.fnFilter( $(this).val(), i );
} );
} );
}
[/code]
so for example if we have a column which include A-Z alphabet it only render through the first 0-9 which is A to J and ignore the rest of the values.
I can see what the problem is: which is only rendering what it is getting from "oSetting.aiDisplay" .
any help would be appreciated
Thanks in advance.
This discussion has been closed.
Replies
http://datatables.net/release-datatables/examples/api/multi_filter_select.html