Quantcast
Channel: DataTables 1.10 — DataTables forums
Viewing all articles
Browse latest Browse all 2366

When I set a default column for ordering and direction, all other Datatable options are disabled

$
0
0

I have the following initialization code:

$(document).ready(function () {
    // General DataTable with no special actions
    var datatable = $('#datatable').DataTable({
        responsive: true,
        autoWidth: false,
        pagingType: 'full',
        jQueryUI: false
    });
    // Logs DataTable with sort on updated_at
    var logstable = $('#logstable').DataTable({
        responsive: true,
        autoWidth: false,
        pagingType: 'full',
        jQueryUI: false,
        order: [[7, "desc"]]
    });
   ...

If I use id="datatable", all is normal. If I use id="logstable", I get the ordering that I request. However, all other options disappear. I no longer have the capability to order columns, page, search, etc. Also, the table is no longer responsive which is my primary issue in this particular case. Is this expected? What can I do to select a default column and order and yet still maintain all the other options, especially a responsive table? Thanks so much for your code and your support!


Viewing all articles
Browse latest Browse all 2366

Trending Articles