How to realise custom filtering with server side procesing?

How to realise custom filtering with server side procesing?

sangokusangoku Posts: 4Questions: 0Answers: 0
edited August 2011 in General
Hello i have a big dbs o front end processing is out of question.

I found this http://www.datatables.net/release-datatables/examples/plug-ins/range_filtering.html example where you can add custom filters for the tables, but i need to realize this with server side processing and i need custom positioning of it. Can someone help me out pls??
All i need to know is how to pass the custom filters so they reach the server, and how to set the names of the variables which reach the server.
http://www.datatables.net/release-datatables/examples/data_sources/server_side.html

I will completly rewrite the server side procesing so it fits my framework, but i need a way to push the custom filters to the server with each refresh of the table.

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    http://www.datatables.net/ref#fnserverdata
    [code]/* POST data to server */
    $(document).ready(function() {
    $('#example').dataTable( {
    "sAjaxSource": "data_source.php",
    "fnServerData": function ( sSource, aoData, fnCallback ) {
    /* Add some data to send to the source, and send as 'POST' */
    aoData.push( { "name": "my_field", "value": "my_value" } );
    $.ajax( {
    "dataType": 'json',
    "type": "POST",
    "url": sSource,
    "data": aoData,
    "success": fnCallback
    } );
    }
    } );
    } );
    [/code]
  • sangokusangoku Posts: 4Questions: 0Answers: 0
    Thy for the fast comment. I forgot to write here i already figured it out :P

    Man this stuff is so easy to do :)


    Great job with it!!!!!!! I love it!!!!!
  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    I agree. DT is a great product. I hope more people start using it and also support development with donations.

    I am not the author, or affiliated with the product. This is an honest endorsement.
This discussion has been closed.