trouble with search - it searches inside the html link

trouble with search - it searches inside the html link

deedee Posts: 2Questions: 0Answers: 0
edited October 2013 in General
hello, i really want to use this great extension, but i am somehow troubled by the way the search works (or not)...
i looked around in the forum for solutions, this was the closest one to my problem (http://datatables.net/forums/discussion/comment/40669) but its not clear if it got fixed or where to add the suggested code.

my problem:
i have a table with the first column being html-links ( Customer A) and on the second column there are the names of the contact persons. now there is one person having the string "dre" in his name, when i do the search, it also shows me all other rows, because in every entry of col1, there is the string "...adress..." inside the href...

i tried
"aoColumns": [
{ "bSortable": true, "sType": "html" },
{ "bSortable": true, "sType": "html" },
{ "bSortable": true, "sType": "html" },
{ "bSortable": true, "sType": "html" },
{ "bSortable": true, "sType": "html" }
]
the same with "string" instead of "html" (i wasnt sure which one to use), but it didnt work at all...
any suggestions?

Replies

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    You might try individual column filtering
    http://jquery-datatables-column-filter.googlecode.com/svn/trunk/default.html
    instead of the global search.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    This, I'm sorry to say, is a bug in 1.9.4. It was introduced by mistake in that version. Its fixed in the dev version if you fancy giving it a go: https://github.com/DataTables/DataTables/tree/1_10_wip/media/js

    Allan
  • deedee Posts: 2Questions: 0Answers: 0
    great allan! thanks, it works like a charm now. i see you changed the input-field from type=text to type=search, i was wondering why my auto-search-button did not work anymore... anything else i need to be aware of?
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    There are lots of changes in 1.10! Entirely new API added, fnRender and bScrollInfinite have been removed and more. I'll create full release notes when I put it into beta status.

    Allan
This discussion has been closed.