Individual column filtering

Individual column filtering

walliby84walliby84 Posts: 3Questions: 0Answers: 0
edited September 2013 in General
I am using server side processing and I am unable to get individual column filtering to work. Normal filtering works fine when value is passed in sSearch. But when I add the column parameter to fnFilter, I confirm it is populating sSearch_1, but the table does not get filtered. Also, note that I am using CakePHP and the datatable plugin (https://github.com/cnizzdotcom/cakephp-datatable). Below is my code.



$(document).ready(function() {

var oTable = $('#addProspect').dataTable({
"iDisplayLength": 10,
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "UserProspects/add",
"sDom": 'CRTrtip',
"oLanguage": {"sInfoFiltered": ""},
"aoColumns":[
null,
null,
null,
null,
null,
null,
{bSortable: false, bSearchable: false},
],
"fnCreatedRow": function(nRow, aData, iDataIndex){
$('td:eq(6)', nRow).html('Add');
}
});

//filter association
$('select#association').change( function() { oTable.fnFilter( $(this).val(), 1); } );
//filter major
$('select#major').change( function() { oTable.fnFilter( $(this).val(), 2); } );
//filter fraternity
$('select#fraternity').change( function() { oTable.fnFilter( $(this).val(), 3); } );

});

Replies

  • walliby84walliby84 Posts: 3Questions: 0Answers: 0
    Adding debugger reference...
    when first loaded: idinuj
    when trying to filter 2nd column: eqaxet

    I created a similar test case on the live server and it worked fine... http://live.datatables.net/alalay/
  • walliby84walliby84 Posts: 3Questions: 0Answers: 0
    Apparently, individual column filtering was not implemented in the CakePHP plugin in I am using. Sorry for the post.
This discussion has been closed.