how to display filtering DataTable Column Filter - Server Side use SELECT

how to display filtering DataTable Column Filter - Server Side use SELECT

arulidarulid Posts: 2Questions: 1Answers: 0

//this sample use text filtering

$(document).ready(function() {
// Setup - add a text input to each footer cell
$('#example tfoot th').each( function () {
var title = $('#example thead th').eq( $(this).index() ).text();
$(this).html( '<input type="text" placeholder="Search '+title+'" />' );
} );

// DataTable
var table = $('#example').DataTable();

// Apply the search
table.columns().eq( 0 ).each( function ( colIdx ) {
    $( 'input', table.column( colIdx ).footer() ).on( 'keyup change', function () {
        table
            .column( colIdx )
            .search( this.value )
            .draw();
    } );
} );

} );

Replies

This discussion has been closed.