Search with a criteria
Search with a criteria
microshop
Posts: 11Questions: 4Answers: 1
I want to search with a specific criteria.
For example we have:
Column1: Name, Column2: Age
I want to search only age > 30. If I want to search age = 30, I use table.column(1).search('30')
.
But, how I can search with that criteria?
This discussion has been closed.
Answers
See if this example helps:
https://datatables.net/examples/plug-ins/range_filtering.html
Kevin
Thank you Kevin,
But already I've implemented that filtering for another column, and there isn't documentation about more than one range filtering.
My approach would be to structure the customer filter function with if statements to perform the search as needed depending on the event fired or whatever. The function needs to return "true" if none of your filter code is used, otherwise the table will display 0 rows.
Maybe this example will help understand my comments:
http://live.datatables.net/lasalafe/1/edit
Kevin