Datatables.ServerSide
Datatables.ServerSide copied to clipboard
System.Linq.Dynamic.Core.Exceptions.ParseException: 'No property or field 'Country' exists in type 'Customer''
Sort by Firstname, Lastname, BirthDate and Contact fails because of column-definition in customerDatatable.js to make it work, just remove the the spaces in the column-definitions like this (and also change Country to contact):
}],
"columns": [
{ "data": "id", "name": "Id", "autoWidth": true },
{ "data": "firstName", "name": "FirstName", "autoWidth": true },
{ "data": "lastName", "name": "LastName", "autoWidth": true },
{ "data": "contact", "name": "contact", "autoWidth": true },
{ "data": "email", "name": "Email", "autoWidth": true },
{ "data": "dateOfBirth", "name": "DateOfBirth", "autoWidth": true },
{
"render": function (data,row) { return "<a href='#' class='btn btn-danger' onclick=DeleteCustomer('" + row.id+ "'); >Delete</a>"; }
},
]