Responsive DataTable with Bootstrap3

Responsive DataTable with Bootstrap3

mahfuz01mahfuz01 Posts: 2Questions: 1Answers: 0

Hi

I am trying to use responsive extension for Datatable along with bootstrap 3. but my data is being populated through Serverside ajax. Everything is was working perfectly until I tried to make it responsive. now I have few problems.
1. fnDrawCallback is not firing (sometimes)
2. Bootstrap Styling is not appearing
3. Responsive feature is not working.
4. getting an error on the page where there is no datatable saying Uncaught Error: Cannot read property 'default of undefined and was pointing to $.extend(true, DataTable.defaults, { at datatable.bootstrap.js

I tried to follow the steps provided in http://datatables.net/extensions/responsive/examples/styling/bootstrap.html

Thank you in advance

Answers

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    Please link to a test case showing the issue, as noted in the forum rules.

    Allan

  • mahfuz01mahfuz01 Posts: 2Questions: 1Answers: 0

    Hi Allan

    Thank you for your prompt reply. After a bit more investigation I found the solutions.

    Steps to resolve the issues were:

    1. Remove jquery.dataTable.css
    2. Get the latest Bootstrap (v3.3.0)
    3. Update the datatable.bootstrap.js with condition
      if(DataTable != undefined){
        $.extend(true, DataTable.defaults, {
        .......
      }

    Thank you once again.

This discussion has been closed.