aaSorting: [] not working for me...

aaSorting: [] not working for me...

JephJeph Posts: 2Questions: 0Answers: 0
edited December 2012 in General
I've just come across DataTables this week and LOVE it! GREAT tool...

I've got what might be a complicated mix of UI Tabs, homegrown stuff, sortable, jeditable and TableTools, so it's possible I'm causing this problem elsewhere. Here's my page:

http://apps-test.library.kent.edu/tabletest/table02.php

For this example, click on "Select Table", then in the second pull down, choose "zz000000140". Click the "Table Structure" tab.

I'm rendering this table with the sort on the first column, so it should be in ascending order. When I don't use TableTools on this table, the table renders/sorts as expected. When I add TableTools, the Field Order column sorts 2, 3, 4, 5, 6, 1 - and I can't figure out why the 1 record is bumping to the end. I've tried removing the "grabber" icon for re-ordering the rows, but that doesn't make a difference. Adding/removing aaSorting : [] doesn't change anything. I've tried bSort: false - also doesn't matter.

Any suggestions? I've tried it in different browsers, cleared caching, etc...

Thanks again for a wonderful product!
Jeph

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Hi Jeph,

    It's not sorting numerically, as you have non-numeric data in the column - specifically the 'sortableGrabber' span. That will cause DataTables to detect the column as a string and sort it accordingly.

    I think you probably want this plug-in: http://datatables.net/plug-ins/sorting#numbers_html

    Allan
This discussion has been closed.