Responsive datatables

Responsive datatables

jojo____jojo____ Posts: 9Questions: 5Answers: 0

Hello everyone,

I am working with Datatable and it is all working fine. I use bootstrap but I don't use it with the datatables. I have the last version of datatables available but when I add the attribute responsive: true to my datatable, I get the error that I need datatables 1.10 or newer. But I'm sure that I have the last version !

Is there something that doesnt work when I use bootstrap ? Is there another way to make the datatables responsive ?

Thanks,

Answers

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    Did you read the docs thoroughly?
    http://datatables.net/extensions/responsive/

    You need the correct css and js files.

  • jojo____jojo____ Posts: 9Questions: 5Answers: 0

    Yes I included all the files needed. Chrome is showing me the lines in the responsive.js file which are testing the version and saying I dont have the right one but I do:
    * @version 1.10.1
    * @file jquery.dataTables.js

  • jojo____jojo____ Posts: 9Questions: 5Answers: 0

    Here are the lines that are showed in chrome; where the error happens :

    var Responsive = function ( settings, opts ) {
    // Sanity check that we are using DataTables 1.10 or newer
    if ( ! DataTable.versionCheck || ! DataTable.versionCheck( '1.10.1' ) ) {
    throw 'DataTables Responsive requires DataTables 1.10.1 or newer';
    }
    else if ( settings.responsive ) {
    return;
    }

  • allanallan Posts: 63,552Questions: 1Answers: 10,477 Site admin

    Can you link use to the page so I can debug the problem please?

    Thanks,
    Allan

  • jojo____jojo____ Posts: 9Questions: 5Answers: 0

    Euh I didn't understand. What should I link ? It is the js page of datatables ^^

  • allanallan Posts: 63,552Questions: 1Answers: 10,477 Site admin

    Please give us the URL of the page you are working on so I can access it. See: http://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Allan

  • utkantutkant Posts: 8Questions: 4Answers: 0

    Did you initiate it with a .DataTable and not a .dataTable? If you are initiating it with .dataTable then you are not using v.1.10 but the older version.

  • allanallan Posts: 63,552Questions: 1Answers: 10,477 Site admin

    To qualify that, you will not be getting a 1.10 style API object if you use .dataTable(). You can still use .dataTable(), but it returns a jQuery object, with the old style API (FAQ).

    Allan

This discussion has been closed.