javascript - How do I use orthogonal data in DataTables to sort when using HTML in a render function? -


Here's a basic example to deal with this problem:

If you use the "Total" column You will see that the sorting is not working properly. Something is happening with this problem that I have some HTML there (the span tag that is called "current").

This is a watery example; In reality, the number pulls from an AJAX request, but the concept is the same, and as you can see, I am using functions to render them. Simply adding commas does not seem to be negatively affected, but as soon as I & lt; Span & gt; tag, then when my sorting breaks (my _formatStuff function in this example).

  $ ('# test_sort'). DataTable ({Column: [{}, {rendere: _formatStuff}], column def: [{target: 1, classname: 'right'}], paging: wrong, search: incorrect, info: wrong});   

I was reading in the datable docs, but I am not clear how I will use it. Can I add some other properties apart from this so that the original value should be used as the sort value? It seems that it is using production, and it is clearly problematic.

I can understand it out Some people took me to the right path towards the answer. I had to use only one and then specify the sType field on the column, and he did the trick.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -