Editor (DataTable is not defined)

Editor (DataTable is not defined)

mazamgomazamgo Posts: 4Questions: 0Answers: 0
edited July 3 in Free community support







Hello, I am starting with the use of Datatables-Editor-Server 2.2.2, My project is in Asp.net Core 8 and
I made the inclusion via Nuget and the error tells me "DataTable is not defined", I really don't know what it does to me
I need to add or do, for it to work correctly, below I attach a series of images of
My project. I would appreciate your help.

Replies

  • kthorngrenkthorngren Posts: 21,327Questions: 26Answers: 4,949
    edited July 3

    I might be missing it but it doesn't look like you are loading the Datatables and Editor libraries. See the Datatables installation and Editor installation docs for details.

    You the Download Builder to get the appropriate files. If you are wanting to try the trial version of Editor use the Editor download page.

    I made the inclusion via Nuget

    Make sure they are being loaded. Possibly use the browser's network inspector to very the .js files being loaded. Make sure they are loaded before initializing Editor and Datatables.

    See if the debugger shows Datatables is loaded.

    Can you post a link to your page or test case showing the issues so we can help debug?
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

  • mazamgomazamgo Posts: 4Questions: 0Answers: 0

    Thanks to your help, I was able to get a better idea to correct the problem, so I installed the editor.datatables library through NPM and added the .npmrc file to register the license, then I added the references and verified to load, but now it gives me the following error:
    Datable.Editor is not a constructor. I have also performed the debug and my code is: avajay

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    Can you show me how you are importing the library, and also state if your bundler is using ESM or CommonJS?

    Allan

  • mazamgomazamgo Posts: 4Questions: 0Answers: 0

    Below I attach images of how I am importing the libraries and using CommonJS, Thank you.

    Mauricio


  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    That actually looks like direct inclusion, rather than using CommonJS (the different loaders for Javascript are a nightmare!).

    What you have there looks fine and I would have expected to work. Is it possible you might have loaded DataTables again in a different script somewhere?

    Can you give me a link to the page so I can debug it? You can PM it to me if you can't make it public, that's no problem.

    Allan

  • mazamgomazamgo Posts: 4Questions: 0Answers: 0

    Allan, Thank you for your clarifications. I have tried other installation methods and the one that has worked for me is the file download method.

    Mauricio

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    Cool - thanks for letting me know.

    Allan

Sign In or Register to comment.