• Resolved moliver27

    (@moliver27)


    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/. 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/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    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

    (@moliver27)

    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!

    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

    (@moliver27)

    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.

    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

    (@tobiasbg)

    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.