• Resolved pauldotmac

    (@pauldotmac)


    Hi,
    Is it possible to remove the sorting capability from just 1 column?
    Thanks
    Paul
    Excellent plugin BTW

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    To turn off sorting for a single column, please add this to the “Custom Commands” text field on the table’s “Edit” screen:

    "columnDefs": [ { "orderable": false, "targets": [ 1, 4 ] } ]
    

    This example would turn of sorting for the second and fifth column (note that counting the columns starts with 0 in this code).

    Regards,
    Tobias

    Thread Starter pauldotmac

    (@pauldotmac)

    Excellent, worked as indicated.
    Thank you.
    Paul

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove sorting for a single column’ is closed to new replies.