Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Datatables.net table is not showing

I am trying to use datatables.net by copying the CDN download method.I am using ASP.NET Web Application (.NET Framework) with mvc

(https://i.stack.imgur.com/FuYKd.png)

and adding a Javascript item like this:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

$(document).ready(function () {

    $('myTable').DataTable({
        "scrollY": "450px",
        "scrollCollapse": true,
        "paging": true
    });

});

But the Datatable functionalities is not showing on my table and I get this error:

(https://i.stack.imgur.com/ZNdgg.png)

>Solution :

You have not provided the markup but you might be missing a ‘#’ before myTable so try
$(‘#myTable’).DataTable ….
if ‘myTable’ is your element’s id;

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading