Column filtering in server side - parameter is not sending

Column filtering in server side - parameter is not sending

tiagopetiagope Posts: 2Questions: 1Answers: 0
edited July 2014 in Free community support

Hi.

I have a problem in a column filtering with server-side processing.
The parameter search value is not send!
When i show query string parameters, the columns[0][search][value] aways is empty!

I using Individual Column Filtering https://datatables.net/examples/api/multi_filter.html example.

Tks for help!!

My code:

$(document).ready(function() {
     $('#example tfoot th').each( function () {
            var title = $('#example thead th').eq( $(this).index() ).text();
            $(this).html( '<input type="text" placeholder="Search '+title+'" />' );
      } );
   
      var table = $('#example').DataTable( {
        "bFilter": false,
        "processing": true,
                "serverSide": true,
                "ajax": 'server_side.php',
        "scrollX": true
    } );
             
    table.columns().eq( 0 ).each( function ( colIdx ) {
        $( 'input', table.column( colIdx ).footer() ).on( 'keyup change', function () {
            table
                .column( colIdx )
                .search( this.value )
                .draw();
        } );
    } );
} );

Answers

  • sirojuntlesirojuntle Posts: 1Questions: 0Answers: 0
    edited July 2014

    I believe the problem is because you set "bFilter" as false.
    You disabled all filter system. Remove thisl line or set it as true.

    If you want to remove only the field, you have to use the option "sDom". Try some like:

    var table = $('#example').DataTable( {
    "processing": true,
    "serverSide": true,
    "ajax": "server_processing.php",
    "scrollX": true,
    "sDom": '<"top"l>rt<"bottom"p><"clear">'
    } );

    More information about bfilter http://legacy.datatables.net/usage/features
    More information about sDom http://legacy.datatables.net/usage/options#sDom

  • tiagopetiagope Posts: 2Questions: 1Answers: 0

    Wow!!!!!

    my mistake :)

    Tks for your help.

This discussion has been closed.