how to use datatable in mvc.net core

how to use datatable in mvc.net core

Hi ,

Please suggest how to use datatable in MVC .net core ..Please help , I had tried to use bit it is not working .

thanks
vilas

This question has an accepted answers - jump to answer

Answers

  • TheDottorPTheDottorP Posts: 2Questions: 0Answers: 1

    I have the same problem as Vilas.
    I'm trying to setup datatables in an ASP.NET Core MVC project

    As you can see, both JQuery and Datatables are referenced in my web page, and the error I receive is

    Uncaught ReferenceError: jQuery is not defined
        at jquery.dataTables.js:56
        at jquery.dataTables.js:59
    

    Here is my bower.json file:

    {
      "name": "asp.net",
      "private": true,
      "dependencies": {
        "bootstrap": "3.3.7",
        "jquery": "2.2.0",
        "jquery-validation": "1.14.0",
        "jquery-validation-unobtrusive": "3.2.6",
        "datatables.net": "^1.10.16",
        "datatables.net-dt": "^3.2.2"
      }
    }
    
    
  • TheDottorPTheDottorP Posts: 2Questions: 0Answers: 1
    Answer ✓

    Just came to a solution by myself. Once inspected the generated HTML I found that datatables scripts were loaded before JQuery, hence the error.

This discussion has been closed.