Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show "All" entries throw ajax error. #13

Open
imran-ali opened this issue Nov 2, 2023 · 2 comments
Open

Show "All" entries throw ajax error. #13

imran-ali opened this issue Nov 2, 2023 · 2 comments

Comments

@imran-ali
Copy link

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
Copy link
Author

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.

@adnan-linux
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants