jQuery DataTable with Server-Side processing using .NET Core 2.2
jQuery DataTable with Server-Side processing using .NET Core 2.2
DavidSuescunPelegay
Posts: 8Questions: 0Answers: 0
Hi, I've just created a simple Visual Studio solution using jQuery DataTable with Server-Side processing using .NET Core 2.2 (SDK: 2.2.202).
Check it out: https://github.com/DavidSuescunPelegay/jQuery-datatable-server-side-net-core
Replies
Thanks very much for this! I've added a link to it from the DataTables news feed on the home page.
Allan
Thank you very much allan
Hello what I do not know, is how to place icons or buttons in the columns, to delete and edit record by record, please can you tell me how ...?
@OSCAR VASQUEZ ,
Is this what you're after? If not, this doesn't seem related to the OP, so please could you create a new thread.
Cheers,
Colin
@DavidSuescunPelegay,
I'm using your jQuery project as the basis for a project that I'm working on.
I've got the table showing in my browser correctly, except that during the LoadTable call (either from the page load or clicking on the columns) from the C# always shows the DTParameters parameter as NULL:
And this is my call out from the app.js script:
I believe I've implemented everything correctly. Do you have any idea where to look to see why the DTParameters object would be null in the code-behind?
This is my first DataTable project and I'm not sure where to look.
Thanks for the demo project and hope to hear soon.
-Bryan Clauss
First thing I'd do myself is to check in the browser's Network inspector for the page to see that the data is indeed being sent as a POST with a JSON body. It looks like it should be from the above, but that's where to start.
If it is there, then its a server-side configuration issue, and I'm less certain where to go there...!
Allan
@allan
Thanks for the reply!
I was using Chromes Developer Tools. I found where in the jQuery.js the json object is getting populated and posted (it looks correct there). I also see the json object in the Request Payload section of the Network tab.
I'm just not sure why my C#/.NET code-behind is not seeing it.
Unfortunately there doesn't seem to be a lot of .NET examples on the website and I'm kind of lost here. I'm checking the web for the C# side to see if I missed something.
-Bryan
@Bryan_Clauss
Not sure if you're still having this issue, but I had the same problem integrating some of the code from the solution above into my .NET Core 3.0 web app. Worked fine in 2.2, but not 3.0. I spent hours working on it and it turns out it was that the DTParameters object was not being deserialized properly from the JSON data. I copied the payload being sent to the controller and did a paste special > class from JSON and then changed the controller to accept that new object and it worked.
Hi everyone, I'm currently working in a new version based on .NET Core 3, I'll push it in a few days.
I'll also check all the issues you've send to me.
Yesterday I uploaded a new version of .NET Core 2.2, you can check it out here:
https://github.com/DavidSuescunPelegay/jQuery-datatable-server-side-net-core
Please, stay tuned.
Hi @watch4sharx I've pushed a new release with support to .NET Core 3.0.
Check it out here: https://github.com/DavidSuescunPelegay/jQuery-datatable-server-side-net-core
Excellent - thank you for letting us know and maintaining your package .
Allan
@DavidSuescunPelegay
I'm using your new release with support to .NET Core 3.0 but still getting the same problem as mentioned above DTParameters object null.
Can anyone help me.
Hi @allan I've just updated my project adding .NET 5 support and Swagger Docs.
https://github.com/DavidSuescunPelegay/jQuery-datatable-server-side-net-core
That's awesome - thank you. I've posted it up on the front page links again .
Allan
Hi @allan I've just updated my project adding .NET 6 support
https://github.com/DavidSuescunPelegay/jQuery-datatable-server-side-net-core
Nice, thanks for posting,
Colin
For anyone interested: I have developed a simple but more generalized solution for server side paging, sorting and filtering in .Net 6. The sample I have provided in video series is based on the jQuery datatables
https://datatables.net/forums/discussion/73505/for-net-developers-using-datatables-with-net-6