Note that there are some explanatory texts on larger screens.

plurals
  1. PODataTables Server Side Individual Column Filtering
    primarykey
    data
    text
    <p>I was hoping someone can help me with this. I have been running myself crazy with this.</p> <p>I have a situation where I load the DataTables grid (awesome piece by the way!) and all is great. Then I go to search and I run into problems. The data being populated in the grid is coming from two different database tables (which is fine) but when someone executes a search I have no way of knowing where to go and get the data. I would need to know what criteria the search is about (i.e. title or contact). I see what when the search is called from the server via the default search box there are variables like "sSearch_0" which are all unset, how do those get set?</p> <p>Here is the initialization code for the table:</p> <pre><code>oTable = $('#example').dataTable({ "bJQueryUI": true, "bFilter": true, "sPaginationType": "full_numbers", "bPaginate " : true, "bServerSide" : true, "sAjaxSource" : "php/tabledata.php", "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 0,6,8 ] }, { "sClass": "tdCenter", "aTargets": [ 0,1,2,3,4,5,6,7,8 ] } ], "fnServerData": function ( sSource, aoData, fnCallback ) { aoData.push( { "name": "userid", "value": userid } ); $.getJSON( sSource, aoData, function (json) { fnCallback(json) }); } </code></pre> <p>});</p> <p>I have looked into options for adding data to the "fnServerData " and actually use that for the first initialization server call but am unsure how to use that for a subsequent server call. I have tried to use "fnFilter" but I do not see that executing a server call for more data. At this point I do not see any other way to execute a server call besides the default search box and I see some way of knowing which column the search is for.</p> <p>Can someone help me here and point me in the right direction?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload