DataTables ASP.Net Core Razor Page
DataTables ASP.Net Core Razor Page
vansin
Posts: 15Questions: 4Answers: 0
I am very new to this. Below is the HTML for my table in a Razor page in an ASP.net core project using a model populated with data from database. How do I construct the Javascript section to make the datatable work for this table? I realize the simple one line example below doesn't work but not sure where to go.
$(document).ready( function () {
$('#myTable').DataTable();
} );
Here is the table HTML code:
''''
@Html.DisplayNameFor(model => model.CornerstoneTicketQuery[0].LocationName) | @Html.DisplayNameFor(model => model.CornerstoneTicketQuery[0].ScaleTicketId) | |
---|---|---|
@Html.DisplayFor(modelItem => item.LocationName) | @Html.DisplayFor(modelItem => item.ScaleTicketId) |
'''
This discussion has been closed.
Answers
Here is the HTML table code again.
There are a few thread on the forum discussing this, such as here, and other external resources, such as here.
Colin