Built in search features with the basic DataTables package?

Built in search features with the basic DataTables package?

DemetriDemetri Posts: 8Questions: 0Answers: 0
edited December 2013 in General
I have the very basic use of DataTables and I am curious what all the sort and filter options are. The ones I know are:

You can type multiple words separated by spaces in the search bar to locate an item in the table with two different keywords. That those words do not have to be in consecutive order.

I know that you can hold shift while sorting. Not 100% what thats called tho or what its doing.

Any pointers about this would be great. Trying to figure out all that I have with this basic use. What all I can utilize. I am not familiar enough with jQuery to do much more than that.

Thanks!

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    > I know that you can hold shift while sorting. Not 100% what thats called tho or what its doing.

    Its called multi-column sorting, and it is doing exactly as the name suggests - sorting on multiple columns :-)

    > That those words do not have to be in consecutive order.

    That is correct - the is called "smart filtering" in DataTables terminology.

    Allan
  • DemetriDemetri Posts: 8Questions: 0Answers: 0
    Lets say that I have a table with 5 columns. ID, NAME, TYPE, RATING, and KEYWORDS. And lets say that I have an assortment of websites in that table. Now lets say that some of those sites have a keyword of forum (the keywords column can have 1-5 keywords for each link.) So some of the sites have "forum" in the keyword for that row and some have the word "forum" in the name column. When I search "forum" all the rows with forum in it are returned or filtered. Is there a was to search for a word and show listings from ONLY a specific column? Like If I search "forum" I want to show only results that have forum in a column I specify. Thanks in advance!
  • DemetriDemetri Posts: 8Questions: 0Answers: 0
    Also just wanted to say thanks for your support and answering my questions =)
  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    The documentation explains individual column filtering. For example:
    http://www.datatables.net/release-datatables/examples/api/multi_filter.html
  • DemetriDemetri Posts: 8Questions: 0Answers: 0
    Thank you for your answer! Did exactly as I needed it to, Thank you!
This discussion has been closed.