jquery datatables (bower) asp.net mvc 6 server side processing not working
jquery datatables (bower) asp.net mvc 6 server side processing not working
ar27111994
Posts: 5Questions: 1Answers: 0
I've tried this famous link (although written for mvc5) but it doesn't work in mvc 6. Please can anyone provide some instructions for doing the same as done in the link but in aspnet mvc 6? I get the following error when running the code provided for mvc5 in my mvc6 project:
Error Image
and the following javascript errors.
Error Image
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
So no one interested :'(
Hi,
I'm not sure if the author of the article you linked to reads this forum, so if you are having problems with the instructions in that post you might want to ask in their comments section.
The error you are seeing is coming from the server-side (DataTables is just reporting the error):
Possibly it is as simple as a
new
operator missing, but I'm afraid I don't know MVC6 well. You'd need to ask in an MVC forum as it doesn't appear to be a client-side problem.Allan
Thanks Allan, actually, I found this article on your website. Secondly the javascript errors that I mentioned say that the columns property of oTable is undefined:
Cannot read property 'every' of undefined .
which is oTable's columns property in my case.
Hi,
The article you linked to is on
echosteg.com
notdatatables.net
. I'm afraid I don't know the author of the article.Can you link to your page so I can debug the Javascript errors please? However, I suspect you'll need to fix the server-side issue first.
Allan
the link to that article*
http://datatables.net/news/
see "Server-side with ASP.NET MVC 5" on this page.
Unfortunately No I can't, as I'm developing on localhost.
Thanks for clarifying that its a link to am external site. I'm afraid that I can't offer stuff for information provided on an external site, even if it is linked here. That would make for an extraordinary amount of work for free software! I linked to it in good faith that it worked for the versions mentioned in the article. I sounds like it might need an update for new versions. As I say you would need to contact the author, or I'm sure if you were to debug it and update the code and post your solution others would find it useful.
On the client side I'm afraid I can't offer any help without a test case, since I have no way of debugging the issue. I'm happy to help there, but need to be able to see the issue to be able to offer any advice!
Allan
Hi, I am the author of the post. The example I have posted was developed and tested with MVC 5 (as I have mentioned in the article title). It may not work with MVC 6 'as-is'. You may have to make changes. Unfortunately I have not worked with MVC 6 yet. However, if you can upload and share the MVC 6 solution, I am certainly happy to help...
Cheers.
@cynx - Thanks for finding this thread and posting back - much appreciated!
Allan
Thank you @allan and @cynx for responding on this topic. I've not been doing doing this stuff lately. I'll try to inspect the problems in Api trough Postman and post the results. Meanwhile all I can say is that I'd to replace
SortBy
withOrderBy
inResultSet.cs
with the corresponding changes to
SortOrder
Property ofDTResult
Class to get compiled.@ar27111994 Did you get anywhere with the MVC 6 solution?