Individual column filtering not working with HTML in cells
Individual column filtering not working with HTML in cells
![oktalk](https://secure.gravatar.com/avatar/53a5b7fc9da3b6b497bdd4cd2e24e9c1/?default=https%3A%2F%2Fvanillicon.com%2F53a5b7fc9da3b6b497bdd4cd2e24e9c1_200.png&rating=g&size=120)
I'm using this " http://datatables.net/examples/api/multi_filter_select.html " on my table successfully. Unfortunately, my table cells contain HTML. Because of this I'm not able to sort using the select elements. From what I can tell it looks like I need to modify the "fnGetData" function to only get the inner text of the cell and not the HTML, but I don't know how to do that.
Could anybody help?
Could anybody help?
This discussion has been closed.
Replies
"Not able to sort using the select elements" - aren't the select elements being used for filtering? Or are you wanting to sort the select elements?
Allan
I'm using this exact method: http://datatables.net/examples/api/multi_filter_select.html
The only difference between the example and my implementation is I have HTML in my cell tables. So my select elements look like this:
[code]
Some Text
[/code]
I need a way to grab the text of a cell, not the innerHTML of the cell, and add that to the value attribute of my option tag. Any ideas? Please use the fiddle if you can.
"...
"aoColumnDefs": [
{ "sType": "html", "aTargets": [ "_all" ] }
]
..."
But that didn't do it. Updated example: http://jsfiddle.net/96GEU/1/