• Resolved Argentum

    (@argentum)


    Hi,

    I want to disable column head sortability altogether. I am merging several spreadsheets through the IMPORTRANGE. The merging works fine but the sortable column heads are an invitation to trouble. I could add the class no-datatables But still want the PDF, Exel and Print buttons.

    https://datatables.net/reference/option/columns.orderable
    I tried to use a parameter in the shortcode like datatables_orderable=”false” and datatables_columns_orderable=”false”, but no luck yet.

    Shortcode parameters:
    datatables_paging=”false” datatables_columns_orderable=”false” use_cache=”0″ footer_rows=”0″ header_rows=”0″ class=”no-responsive” datatables_order=”%5B%5D”

    Would it be possible to disable orderable for all columns with a shortcode parameter?

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

    (@argentum)

    I think I sorted (ho ho) it out on my own. Leaving the comment for the other nitwits out there.

    
    {
        "dom": "B<'clear'>lfrtip",
        "buttons": [
            "excel",
            "pdf",
            "print"
        ],
        "columnDefs": [
            {
                "orderable": false,
                "targets": "_all"
            }
        ]
    }
    
    Plugin Author Meitar

    (@meitar)

    Glad you worked it out. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Disable column head sortability with columns.orderable’ is closed to new replies.