Why Jquery Datatables search box does not work?

Why Jquery Datatables search box does not work?

DankanDankan Posts: 8Questions: 3Answers: 0

I am using Jquery Datatables plugin....the table loaded perfectly fine with all the data but searching does not work,i have manged to make sorting work but i am unable to make searching work.i have tried to google all around for almost two days but no luck at all,Could anyone please help or point me to the right direction?.When i try to search anything on my table search box it says 'No matching Found' even though i can see a data i am trying to search.Hope to hear from you as soon as possible...as I am loosing time on this project because of this issue

I am using:-
Datatables version 1.10.12
Jquery 3.1.0
Here is my code in action https://jsfiddle.net/Dankan96/egcqcxfh/1/

Answers

  • allanallan Posts: 63,121Questions: 1Answers: 10,397 Site admin

    Hi,

    The search doesn't work in your table because the table's data contains input elements. DataTables reads the data from the DOM, which in this case is something like <input type="text"/>. The value of the input element is a property of that node and is not something that DataTables can directly access.

    Unfortunately there is no good clean way of using DataTables to filter such a table at this time. It might be possible to hack it using the columns.render option which passes in meta information, but it would be really poor performance wise and non-trivial.

    Allan

  • DankanDankan Posts: 8Questions: 3Answers: 0

    Hi Allan
    Thank you for your quick responce.Can you please.....give me a quick simple example.I have tried to go through that ....columns.render option but i see only Json data manipulation.I am not sure how i can try to think based on my situation.

  • allanallan Posts: 63,121Questions: 1Answers: 10,397 Site admin

    It would probably take about an hour to put together. I'm afraid I've already got quite a large back log of support requests, so it will be a while before I can do so.

    Allan

  • DankanDankan Posts: 8Questions: 3Answers: 0

    Thank you ..Allan...I am ready to.wait for that responce.I do understand your workload.

  • DankanDankan Posts: 8Questions: 3Answers: 0

    Hi Allan any update on this?

  • allanallan Posts: 63,121Questions: 1Answers: 10,397 Site admin

    No sorry. It will likely be weeks rather than days before I can do this I'm afraid.

    Allan

  • DankanDankan Posts: 8Questions: 3Answers: 0

    Okay............I will be waiting for that.

  • DankanDankan Posts: 8Questions: 3Answers: 0

    Any update Allan?

  • allanallan Posts: 63,121Questions: 1Answers: 10,397 Site admin

    No sorry. If this is urgent, priority support is available and that would allow me to prioritise it.

    Allan

This discussion has been closed.