Title: formatting the DataTables Sorting plugin
Last modified: August 22, 2016

---

# formatting the DataTables Sorting plugin

 *  Resolved [moliver27](https://wordpress.org/support/users/moliver27/)
 * (@moliver27)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/formatting-the-datatables-sorting-plugin/)
 * Hello, tremendous plug-in by the way!! I am currently using your tablepress plugin
   to house documents that are related to a specific product number for the company
   I work for. You can access the table here: [http://www.willburt.com/support/support-center/ez-spec/fold-down/](http://www.willburt.com/support/support-center/ez-spec/fold-down/).
   I recently installed the Sorting plugin for the 6th & 7th columns, “Total Lumens”&“
   Total Watts”, however, I cannot figure out how to get the columns to format properly.
   Is there anyway to sort from 0 to 1,000,000 in ascending order? Currently I have
   the “columnDefs”: [ { “type”: “formatted-num”, “targets”: [ 6, 7 ] } ] code written
   into my custom commands database but I can’t figure out how to list the values
   from 0 to 200,000 in ascending order. Any help would be great. Thanks!
 * [https://wordpress.org/plugins/tablepress/](https://wordpress.org/plugins/tablepress/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/formatting-the-datatables-sorting-plugin/#post-5489487)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * I just checked this table, and the columns that you are mentioning are working
   fine for me. Where exactly is the sorting not working? Maybe I’m just not seeing
   it?
 * Regards,
    Tobias
 *  Thread Starter [moliver27](https://wordpress.org/support/users/moliver27/)
 * (@moliver27)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/formatting-the-datatables-sorting-plugin/#post-5489533)
 * Tobias,
 * Under the “Total Lumens” drop down box, the top numbers are 102,000, 105,000,
   112,000, 117,000, 12,000, 120,000, 123,600, etc.
 * Is there are anyway to display all the values in order? From 12,000 up to 210,000
   in chronological order?
 * 12,000, 16,000, 21,000, 24,000,…96,000, 102,000…210,000?
 * I hope my question is clear, it’s hard to explain this. Thanks!
 *  [nicloucross](https://wordpress.org/support/users/nicloucross/)
 * (@nicloucross)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/formatting-the-datatables-sorting-plugin/#post-5489534)
 * Wow I really like how you’ve got your table set up and I want to do something
   very similar – any chance you can tell me what you did? Or point me to the documentation
   explaining how you did it? I’m not having much luck on my own.
 * Many thanks
 * Nic
 *  Thread Starter [moliver27](https://wordpress.org/support/users/moliver27/)
 * (@moliver27)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/formatting-the-datatables-sorting-plugin/#post-5489535)
 * nicloucross, thanks for the compliment! It’s a lot of custom CSS styling to say
   the least. I used the “Column Filter Widgets” extension to sort the fields and
   I used the “Fixed Header” extension to keep the header at the top when you scroll
   down to the bottom of the page. Other than that, I spent a lot of time looking
   up tutorials to figure out how to center the text, change the background and 
   text color of the header, configure the column width and cell padding, etc. I
   can help with the CSS coding as much as I can with what I already have in place
   if you need. Let me know and good luck! Thanks.
 *  [nicloucross](https://wordpress.org/support/users/nicloucross/)
 * (@nicloucross)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/formatting-the-datatables-sorting-plugin/#post-5489536)
 * Thanks Moliver27,
    That’s awesome thank you – I have managed to get the extension
   up and running – will have a play now. Thank you so much and good luck with your
   formatting issue.
 * Nic
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/formatting-the-datatables-sorting-plugin/#post-5489540)
 * Hi,
 * moliver27, now I see. You are not refering to the sorting in the table but in
   the drop down. Unfortunately, I have to disappoint you here 🙁 I’m not aware 
   of a possibility to adjust the order in that 🙁 The ColumnFilterWidgets JS library
   will basically just sort the items as strings and not numbers. This would somehow
   have to be changed in the library’s JS code, but I don’t know how to do that,
   as I’m not the developer of the library. Sorry.
 * Regards,
    Tobias

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘formatting the DataTables Sorting plugin’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/formatting-the-datatables-sorting-plugin/#post-5489540)
 * Status: resolved