add another form search to datatables

add another form search to datatables

mkourkchmkourkch Posts: 18Questions: 0Answers: 0
edited August 2011 in General
it's possible to add another form search to datatables?

thinks for help.

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    edited August 2011
    yes. you can choose not to show the default search textbox as well by not including it in the sDom (take out the 'f' (filtering)) http://www.datatables.net/ref#sDom
    [code]sDom: 'lrtip', // took out 'f'[/code]

    or if you want to have the same filtering search box show up more than once, you can specify it multiple times in the sDom. each one should work
    [code]sDom: 'lfrtifp', // filter box above and below the table 't'[/code]

    when using your own search box, trigger a search by calling the API function fnFilter http://www.datatables.net/ref#fnFilter you can do this for every keypress, or wait for an enter key, or bind to a button, etc. totally up to you
    [code]var oTable;

    $(document).ready(function() {
    oTable = $('#example').dataTable();

    /* Filter immediately */
    oTable.fnFilter( 'test string' );
    } );[/code]
  • mkourkchmkourkch Posts: 18Questions: 0Answers: 0
    i think that is very difficult because i have 4 select and input text. i think that if it's possible to do multiple filtring only for some column it's ok for me . some one has an idea for this please.
  • mkourkchmkourkch Posts: 18Questions: 0Answers: 0
    i come back with this problem . i want to send the data of this form to datatables :



    Crit?re de séléction   ContexteLieuACPButPriorit?Statutchoisir un crit?re parmi la liste


       introduire du texte

    ET/OU   ET OUchoisir la jointure pour votre condition de recherche

    Date   Date début égale ?Date début inf?rieur ? Date début sup?rieur ?Date de fin égale ?Date de fin inf?rieur ?Date de fin sup?rieur ? date d'?cheance ?gale ?Date d'?cheance inf?rieur ?Date d'?cheance sup?rieur ?choisir condition sur date


       introduire la date sous format yyyy-mm-dd


    Alarme   Alarme ouiSans alarmechoisir si votre recherche avec ou sans alarme



    Chercher
This discussion has been closed.