Strip HTML and then sort numerically
Strip HTML and then sort numerically
Hello, I have a column of IDs that also have a checkbox in it with the ID wrapped around a label associated with the checkbox. I have sType on that column set to 'html' so it strips the HTML, but it seems it's then sorting the column as a string type rather than numeric type after it strips the HTML. Is this a bug or intended, and how would I go about having sType be html:numeric?
Thanks.
Thanks.
This discussion has been closed.
Replies
Use this plug-in: http://datatables.net/plug-ins/sorting#numbers_html
Also you might be interested in this example if you are doing sorting with checkboxes: http://datatables.net/examples/api/dom_sort.html
Regards,
Allan
And nope, not sorting with checkboxes; they're there for something else. But that's pretty cool. DataTables is incredibly useful.