MVC jquery datatable return multiple ajax response

MVC jquery datatable return multiple ajax response

teohwsteohws Posts: 3Questions: 0Answers: 0
edited August 2013 in General
I had no idea where to ask, I new to jquerydatatabl server processing, with the below tutorial, I had make it work
http://www.codeproject.com/Articles/155422/jQuery-DataTables-and-ASP-NET-MVC-Integration-Part

but is weird that each time fire to server, it will return 3 same respond, same data but with different encho from server? Is that the normal behavior? It look like will slow down the table process ever just a few record

example:
aaData: [[New, 19/08/2013, T000017, null, null, null, null, null],…]
iTotalDisplayRecords: 17
iTotalRecords: 17
sEcho: "1"

aaData: [[New, 19/08/2013, T000017, null, null, null, null, null],…]
iTotalDisplayRecords: 17
iTotalRecords: 17
sEcho: "2"

aaData: [[New, 19/08/2013, T000017, null, null, null, null, null],…]
iTotalDisplayRecords: 17
iTotalRecords: 17
sEcho: "3"

Replies

  • allanallan Posts: 63,506Questions: 1Answers: 10,471 Site admin
    No that's not normal behaviour. It looks like the table is drawing three times for some reason. To say why, we'd need a link to a test case.

    Allan
  • teohwsteohws Posts: 3Questions: 0Answers: 0
    I remove the "bprocessing" from the jquery datatable, and now it return 1 respond, no idea why
  • teohwsteohws Posts: 3Questions: 0Answers: 0
    ok, I guess i'm wrong, I found the culprit that cause my jquery datatable return multiple response from server, instead of "bprocessing", I figure out that the RowGrouping plugin caused my datatable to return multiple respond from the server
This discussion has been closed.