$.fn.dataTable.Responsive.display.modal() isn't working

$.fn.dataTable.Responsive.display.modal() isn't working

tonykaitonykai Posts: 21Questions: 7Answers: 0

Hello :smile:

First of all , My english is very poor ,

i have one problem need your help for set responsive parameter .
According method from your examples ,i set blow 'responsive' parameter in my code
responsive: {
details: {
display: $.fn.dataTable.Responsive.display.modal()
}
}

when i finished it , webpage will report one error 'Uncaught TypeError: Cannot read property 'display' of undefined'
if i set 'responsive' parameter is true , webpage is ok .

Why this trouble is happened ? if i have to set one child row for all rows in advance and these child rows have to be hide in advance too , in this way i can use ' display: $.fn.dataTable.Responsive.display.modal() ' for show hidden child row information in bootstrap modal isn't is ?

BR
Kai

Answers

  • allanallan Posts: 64,075Questions: 1Answers: 10,565 Site admin

    Can you link to a test case showing the issue please. It seems to work without issue here.

    Allan

  • tonykaitonykai Posts: 21Questions: 7Answers: 0

    Hello :smile:

    i make one test via http://live.datatables.net/loyogevo , i only add below these words in dataTable

    then system still report error "Cannot read property 'display' of undefined "

    responsive: {
    details: {
    display: $.fn.dataTable.Responsive.display.modal( {
    header: function ( row ) {
    var data = row.data();
    return 'Details for '+data[0]+' '+data[1];
    }
    } )
    }
    }
    i had been upload error image .
    Please help me i don't know where is the wrong in .

    BR
    Kai

  • tonykaitonykai Posts: 21Questions: 7Answers: 0

    Sorry

    upload isn't success . i do it again .

  • kthorngrenkthorngren Posts: 21,727Questions: 26Answers: 5,027

    You need to add the responsive code. Go to Add Library and select responsive. You will need to move the added lines to the proper order. You can update the added lines to load the version you are using.

    Kevin

  • tonykaitonykai Posts: 21Questions: 7Answers: 0

    hello ,

    I can't find out relevant templates for add responsive code from your website . Can you help me provide some templates ? i need some simple templates to learn it .

    thank you
    BR
    Kai

  • allanallan Posts: 64,075Questions: 1Answers: 10,565 Site admin

    This example shows it working with all the required libraries being loaded.

    Allan

This discussion has been closed.