Individual column filtering + Server-side processing EXAMPLE

Individual column filtering + Server-side processing EXAMPLE

mQmQ Posts: 4Questions: 0Answers: 0
edited February 2010 in General
Hello,
I use the data table for my project, but I have a problem.
Is there any sample or example for individual column filtering + server side processing ?

Thank you

Replies

  • allanallan Posts: 63,700Questions: 1Answers: 10,501 Site admin
    There isn't a sample for it at the moment, but it's fairly trivial to add. DataTables sends the column search information as part of it's standard message ( http://datatables.net/usage/server-side ), so all you need to do is use sSearch_(int) in your WHERE statement.

    Allan
  • mQmQ Posts: 4Questions: 0Answers: 0
    Hello,
    Thanks for helpful response.
    But I have another one idea... Is it possible change input type in tfoot search filter for select box... ?

    short example:

    (index.php)
    ----------------
    [code]




    -
    1
    2




    [/code]


    (header.php)
    ----------------
    [code]
    $("tfoot select").keyup( function () {
    oTable.fnFilter( this.value, $("tfoot select").index(this) );
    //document.write("Value =" + this.value, "Select box =" + $("tfoot select").index(this));
    } );
    [/code]

    First problem in this solutions:
    when I click on select box with mouse - NO ANSWER (I must click ENTER on keyboard)
    and when I choose some value from select box with keyboard and press ENTER - I HAVE ANSWER

    Second problem:
    sSearch_(0) from input si same like sSearch_(0) from select box


    I NEED HEEELP :)
    Excuse me for my English... :}

    Thanks
  • allanallan Posts: 63,700Questions: 1Answers: 10,501 Site admin
    Yes indeed - rather than listening for a 'keyup' event, just listen for a 'change' event: http://api.jquery.com/category/events/

    Allan
This discussion has been closed.