First time I use DataTables

First time I use DataTables

FPLSFPLS Posts: 5Questions: 1Answers: 0
edited August 2021 in Free community support

This is my first time using DataTables.

I have a simple razor page, with a simple javascript and I am not able to load the data from an api that works and that is tested with postman.

I obtain an error undefined aDataSort: Log file attached.

Libraries:
css:
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.25/css/dataTables.bootstrap4.min.css">

javascript libs:
https://cdn.datatables.net/1.10.25/js/jquery.dataTables.min.js https://cdn.datatables.net/1.10.25/js/dataTables.bootstrap4.min.js

Javascript code:
$(function () {
$('#record').dataTable({
"ajax": {
"url": "https://localhost:44330/api/record/4", //this work fine
"type": "GET"
}
});
});

Razor page: as simple as: (editor not allow tags)
table id="record" class="table table-sm"
/table

Thank you very much for your help.

This question has an accepted answers - jump to answer

Answers

Sign In or Register to comment.