Individual column filtering not working with HTML in cells
Individual column filtering not working with HTML in cells
oktalk
Posts: 3Questions: 0Answers: 0
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/