How to create for filter

How to create for filter

ravi.gupta@aksystems-inc.comravi.gupta@aksystems-inc.com Posts: 2Questions: 0Answers: 0
edited July 2016 in Free community support

How can I create a form filter in Data Table and it should also work in ajax as well?
I have tried below code but its not working

[code]
<input type="text" name="subject" id="subject"/>

$('#subject').keyup( function() { table.draw(); } );

[/code]

Replies

  • ravi.gupta@aksystems-inc.comravi.gupta@aksystems-inc.com Posts: 2Questions: 0Answers: 0

    I found the solution to solve this issue.

    [code]
    $('#subject').keyup( function() {
    table
    .columns( 0 )
    .search( this.value )
    .draw();
    } );
    [/code]

This discussion has been closed.