• Resolved tchapman95

    (@tchapman95)


    Hello Tobias,

    I am having an issue with sorting of my columns in the Admin Panel where I create the tables. The information in the columns contains dollar figures with comma seperators and $ signs (ex. $21,696,739). The column is not sorting from largest to smallest like I want.

    Now on my website the tables will sort correctly; after re-sorting it the way it should be upon arrival. But the table will not sort correctly in the Admin Panel. I want the table to be pre-sorted based on the information in one column so that the user does not need to resort the table on the website each time they visit.

    I tried downloading the DataTable Sorting plugin but did not get much from it.

    Do you have any suggestions?

    https://ww.wp.xz.cn/plugins/tablepress/

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    The sorting algorithms on the “Edit” screen are only very basic, and they can not take data types into account.
    One option here would be to export the table to a CSV file, open that in Excel, sort the column there, and then re-import the file into TablePress (choosing to replace the existing version).
    Another option would be to instruct the frontend sorting to perform an inital sort on that column when the table is loaded. This is possible with a “Custom Command” on the “Edit” screen. But I’d suggest the first method here.

    Regards,
    Tobias

    Thread Starter tchapman95

    (@tchapman95)

    Tobias,

    Thank you for the prompt reply. I will try the first method and report back to you with my findings.

    Troy

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

    Thread Starter tchapman95

    (@tchapman95)

    Tobias,

    That worked. Guess I will just to have to add a few steps to my workflow each time I add a row to the table.

    Is it possible to add rows in a specific location? Or can it only add rows to the bottom of the table?

    Troy

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    nice, that’s good to hear!

    And yes, you can insert a row anywhere in the table. Just click the checkbox on the left of a row and then use the “Selected rows: Insert” button to insert a row above those that were selected.

    Regards,
    Tobias

    Thread Starter tchapman95

    (@tchapman95)

    oh being able to insert rows where I need will make things MUCH easier. Thanks. Will mark this as resolved!

    I also left the review and rated.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    great, thanks for the confirmation!

    And thanks for the nice review and rating, I really appreciate that!

    Best wishes,
    Tobias

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

The topic ‘Columns Not Sorting in Admin Panel’ is closed to new replies.