Individual column filtering feature not working.

Individual column filtering feature not working.

huyschihuyschi Posts: 17Questions: 4Answers: 1

Hi,

I'm trying to implement the Individual column filtering feature, but somehow it is not working
I have loaded the required files:
https://code.jquery.com/jquery-3.3.1.js
https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js
https://cdn.datatables.net/colreorder/1.5.2/css/colReorder.dataTables.min.css
https://cdn.datatables.net/colreorder/1.5.2/js/dataTables.colReorder.min.js

Attached you will find the code to implement the filtering (pdf file), just as explained in the manual. Column reordering is working fine, same as sorting and search...

Any assistance will be very much appreciated. Thank you.

Regards,
Nissim

Answers

  • kthorngrenkthorngren Posts: 21,164Questions: 26Answers: 4,921

    Looks like you need to add the tfoot in your HTML so its available when your code creates the inputs. If this doesn't help please create a test case so we can see how your code is behaving.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

  • huyschihuyschi Posts: 17Questions: 4Answers: 1

    Hi,
    Thank you for your quick response.
    The only change I get after adding the tfoot is, that the table headers are added to the bottom of the table, but no possibility to filter a column.
    Maybe I have not made my self clear, what I need is what what can be seen in the following link: https://datatables.net/extensions/colreorder/examples/initialisation/col_filter.html

    I need the fields at the bottom of the table, under each column, so that I can type to filter the data in the column.
    Hope this makes things clearer. Thank you.

    Regards,
    Nissim

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Hi @huyschi ,

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • huyschihuyschi Posts: 17Questions: 4Answers: 1

    Hi David,

    All is fine now. I just forgot to add two column headers to the tfoot. Adding them has solved the issue.
    Thank you again.
    I don't know how to I do the "accept" of the answer.

    Regards,
    Nissim

This discussion has been closed.