WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: WP-Table Reloaded] Custom Sorting Command

[Resolved] [Plugin: WP-Table Reloaded] Custom Sorting Command

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TobiasBg
    Participant

    @tobiasbg

    Hi,

    there might have been some miscommunication in my tweet leading to this post: For this, a “Custom Command” is not enough unfortunately. Instead, you will need to call a custom DataTables API function via some JavaScript code, which you can find at http://datatables.net/plug-ins/api#fnSortNeutral You could for example add a button to your page and execute that code when the button is clicked.

    The “Custom Command” that I mentioned was targeted at being able to exclude columns from being sortable. That is possible by adding

    "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 0, 2, 3 ] } ]

    to the “Custom Commands” textfield in the “DataTables JavaScript features” section on the “Plugin Options” screen of WP-Table Reloaded.
    This example would make columns 1, 3, and 4 non-sortable (counting starts with 0).

    Regards,
    Tobias

    reedbird8
    Member

    @reedbird8

    Thanks, Tobias. Appreciate all your assistance!

    Plugin Author TobiasBg
    Participant

    @tobiasbg

    Hi,

    sure, no problem! You are very welcome!

    Best wishes,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] [Plugin: WP-Table Reloaded] Custom Sorting Command’ is closed to new replies.