jQuery-datatable-server-side-net-core icon indicating copy to clipboard operation
jQuery-datatable-server-side-net-core copied to clipboard

Show "All" entries throw ajax error.

Open imran-ali opened this issue 2 years ago • 2 comments

Its working fine until we click on Show "All" entries - it throws an error: "DataTables warning: table id=test-registers - Ajax error. For more information about this error, please see http://datatables.net/tn/7"

imran-ali avatar Nov 02 '23 16:11 imran-ali

This is a great learning resource, thank you for all your thorough efforts.

Also, if you mention a bit about the "AddJsonOptions" Dependency Injection in the "Program.cs" on the project home page, then people like myself will be able to integrate your class better in their existing project.

imran-ali avatar Nov 11 '23 08:11 imran-ali

if (dtParameters.Length == -1) { return Json(new { draw = dtParameters.Draw, recordsTotal = totalResultsCount, recordsFiltered = filteredResultsCount, data = result.Skip(dtParameters.Start).ToList() }); } else { return Json(new { draw = dtParameters.Draw, recordsTotal = totalResultsCount, recordsFiltered = filteredResultsCount, data = result.Skip(dtParameters.Start).Take(dtParameters.Length).ToList() }); }

above code with fix the issue i guess.

adnan-linux avatar Nov 18 '23 13:11 adnan-linux