• Resolved mayte_eme

    (@mayte_eme)


    hi-
    i installed tablepress plus these 2 extensions:
    1. tablepress-datatables-sorting-plugins
    2. tablepress-table-row-order

    I have a table with 2 columns (A and B). Column A has names and column B has numbers that go from 0 to 999,999,999 (e.g. 1,256,145 or 256,254 or 456). i was to sort by column B by descending order.

    with ” tablepress-datatables-sorting-plugins” extension i can enable sort ni the edit page and add this line for users to sort themselves: "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 0 ] } ]

    it works but i really want to display the table in the page already sorted without users having to sort themselves. i installed “tablepress-table-row-order” extension and use [table id=1 row_order="sort" row_order_sort_column="B" row_order_sort_direction="DESC" /] in the actual page but no luck .. any help will be greatly appreciate it.

    thanks.

    https://www.ads-software.com/plugins/tablepress/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mayte_eme

    (@mayte_eme)

    never mind.

    guess got too confused and couldn’t see it. i removed “tablepress-table-row-order” plugin. using shortcode[table id=1] to display the page and in tablepress edit page, using "aaSorting": [[ 1, "desc" ]] . that did it ??

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Great find! Yes, the problem here is that the Row Order Extension can only work on real numeric data. As your cells contain a thousand separator in the numbers (the comma), this doesn’t work. You’ll need to use the JS-only approach with those “Custom Commands” that you have already found ??

    Best wishes,
    Tobias

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘display sorting already pre-sorted’ is closed to new replies.