• Resolved Markgoessens

    (@markgoessens)


    Hi Tobias,

    My table is almost perfect. I used the script you provided in this topic:
    https://www.ads-software.com/support/topic/deactivate-sorting-for-some-columns?replies=10

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

    After applying this script, columns 3 and 4 isn’t sortable anymore. That was what I wanted.
    But at the same time my shortcode extension for ‘row details columns’ doesn’t work anymore.
    This was my shortcode extension: datatables_row_details_columns=”E”
    Column E now appears like a normal column instead of only like an expansion.

    When I delete the script ‘disable sorting script’ again, the toggle option works again.

    Can you please tell me how I can make both settings work at the same time?
    Here you can find my table page: LINK

    Thanks in advance.
    Greets Mark

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

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

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    The reason for this is that the Row Details Extension is also setting a command that contains that columnDefs setting. You will therefore need to use this merged “Custom Command”:

    "columnDefs":[{"orderable":false,"targets":[0,2,3]},{"visible":false,"targets":[5]}]

    Note, that in order to prevent sorting on the third and fourth column, you’ll have to use the numbers 2 and 3 in that JS command, as counting starts with 0.

    Regards,
    Tobias

    Thread Starter Markgoessens

    (@markgoessens)

    Hi Tobias,

    Waaw thanks for you quick reply. The merged command is working perfect. So thanks a lot for that.

    Greets Mark

    Plugin Author TobiasBg

    (@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 ‘Deactivate sorting for some columns – conflict with toggle setting’ is closed to new replies.