• Resolved andynz

    (@andynz)


    Hi Tobias
    I have a table which includes several options:
    – Enable sorting
    – Enable Filter or Search

    The short code is:
    [table id=member-list responsive=collapse datatables_buttons=”colvis,excel” datatables_columnfilterwidgets=true datatables_columnfilterwidgets_exclude_columns=3,4,5,6,7,8,9,13/]

    Because I use datatables_buttons and columnfilterwidgets, you previously advised me to include the custom command: “dom”: “BWlfrtip”

    All is working well.

    Now. I would like to remove the sort option from selected columns, say 7 8 9.
    Can you confirm if this is possible and, if so, how the option should be coded in the custom command.

    Regards
    Andy

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Yes, that’s possible! You can extend your “Custom Command” to

    "dom": "BWlfrtip", "columnDefs": [ { "orderable": false, "targets": [ 6, 7, 8 ] } ]
    

    for this.
    The 6, 7, and 8 indicate that the seventh, eigth, and ninth columns should not be sortable (counting starts with 0 in this code).

    Regards,
    Tobias

Viewing 1 replies (of 1 total)

The topic ‘Remove sort option from selected columns’ is closed to new replies.