Search a DataTable on data that is not displayed in the table.

Search a DataTable on data that is not displayed in the table.

09wattry09wattry Posts: 9Questions: 4Answers: 0

I have a table where the user can interact with information related to a record. However, I do not need them to see the text in the table as it is relatively large amounts. Can I add that data to the search without rendering it to the table?

Answers

  • kthorngrenkthorngren Posts: 6,989Questions: 22Answers: 1,520

    Some options I can think of:

    • Display the large data using ellipsis like shown here
    • Place in a hidden column so its searchable using the global (default) search input
    • Don't use a hidden column but as long as the data is in the row you can create a [Search Plugin] and use the 4th parameter in the plugin function to access the row data

    There are likely other options. The second is probably the easiest.

    Kevin

  • 09wattry09wattry Posts: 9Questions: 4Answers: 0

    Kevin, I don't know how you do it man! Thanks!

    https://datatables.net/examples/basic_init/hidden_columns.html

Sign In or Register to comment.