Sort Table but get Sorting Type (or value) from HTML instead if JS
Sort Table but get Sorting Type (or value) from HTML instead if JS
somedatatablesuser
Posts: 7Questions: 0Answers: 0
Hi there,
i'm tryimg to set "sort-values" in the html-code. like:
[code]
hans meier
[/code]
is that possible with datatables or does anyone know a plugin that can do this?
thank you a million for your help.
i'm tryimg to set "sort-values" in the html-code. like:
[code]
hans meier
[/code]
is that possible with datatables or does anyone know a plugin that can do this?
thank you a million for your help.
This discussion has been closed.
Replies
Unfortunately the HTML attribute sorting is one of the examples I've yet to write, but you can tinker in the DataTables source if you want. The `data-sort` attribute will be automatically found and used. See the commit for more:
https://github.com/DataTables/DataTables/commit/5cecbb5
https://github.com/DataTables/DataTables/commit/0f2cc15
Allan
1.) update dataTables to this version 1.10.0-dev:
2.) add html-tag like this:
[code]hans meier[/code]
not working :-(
Allan
http://jsfiddle.net/xE8Z2/
Column "Tel." should use the same sorting values as "Vorname"
Allan
You were using an old version of the 1.10 code, but even the latest had a small issue. I've just fixed is and the source file is here: http://datatables.net/dev/knockout/js/jquery.dataTables.js
Your example updated: http://jsfiddle.net/xE8Z2/1/
Allan