how do I search by column in my project? https://1drv.ms/f/s!Am7jdKKpREdx9wGrrcquxvsMuTAj

how do I search by column in my project? https://1drv.ms/f/s!Am7jdKKpREdx9wGrrcquxvsMuTAj

caio14oscaio14os Posts: 8Questions: 1Answers: 0

how do I search by column in my project? https://1drv.ms/f/s!Am7jdKKpREdx9wGrrcquxvsMuTAj

Answers

  • caio14oscaio14os Posts: 8Questions: 1Answers: 0

    renders, but the filtered columns do not appear

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    You use search() to filter/search - note you have to issue the draw() afterwards, either chained (table.search('fred').draw()), or as two separate API calls.

  • caio14oscaio14os Posts: 8Questions: 1Answers: 0

    how would it look in my code? I'm a beginner, I came here studying, please help me?

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    The best bet is to look at those links above for those methods - all the pages have examples to show you how to use them.

  • caio14oscaio14os Posts: 8Questions: 1Answers: 0

    I looked, but I still do not understand, could you explain me better? thank you

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    If you want to do column based filtering with inputs, this example shows how to do that.

    Allan

  • caio14oscaio14os Posts: 8Questions: 1Answers: 0
    edited July 2018

    I did it, but something is wrong.

  • caio14oscaio14os Posts: 8Questions: 1Answers: 0

    I did it, but something is wrong.

  • caio14oscaio14os Posts: 8Questions: 1Answers: 0

    look

  • kthorngrenkthorngren Posts: 21,301Questions: 26Answers: 4,946

    I put the relevant parts of your code into this server side example and it works:
    http://live.datatables.net/hicesode/1/edit

    but something is wrong.

    What exactly is wrong?

    Since you are using server side processing your server script is responsible for the column searches. Does your script support column based searches?

    What are you using for your server side code?

    Kevin

  • caio14oscaio14os Posts: 8Questions: 1Answers: 0

    you could post what's inside the "ajax" file: "/ssp/server_processing.php"? This is certainly where I'm going wrong

  • kthorngrenkthorngren Posts: 21,301Questions: 26Answers: 4,946

    You can start with this example:
    https://datatables.net/forums/discussion/41720

    Take a look at the Server-side Script tab. You can use any of the options in this thread to get the example server side scripts:
    https://datatables.net/forums/discussion/41720

    Kevin

This discussion has been closed.