is there any example of server side ajax response with more than 1 draw
is there any example of server side ajax response with more than 1 draw
This question has an accepted answers - jump to answer
This discussion has been closed.
This question has an accepted answers - jump to answer
Answers
See this example and perform any operation - sorting, filtering or page change. That should result in a new request to the server which you can inspect using developer tools in your browser.
See more articles about jQuery DataTables on gyrocode.com.
Sounds like you might be calling the
draw()
function indraw
ordrawCallback
perhaps?Allan
use the .fail() deferred object to find out your error. See this example of jQuery post where they have used it. If will be helpful for you.
Actually, you can use error right in your DataTable ajax
Thanks all for your response
I am using to add a class for inactive record
Should I move it esle where ?
Thanks again
Using the
rowCreated
callback will let you do it without accessing any private properties (the settings object and_DT_CellIndex
).Allan
Sorry Allan
but when I click on rowCreated I get a 404 Page not found
I think Allan meant to point you to
createdRow
.Kevin
Hi again
I have deleted the drawCallback and remove all the draw but still looping
draw:1
+++
order[0][column]:1
order[0][dir]:asc
start:0
length:1200
search[value]:
search[regex]:false
And I return
{"draw":1, "recordsTotal": 100, "recordsFiltered": 100, "data": [{++
and then it goes on for draw 2, 3, 4 and so on
Oops - yes I did. Thanks for the correction Kevin.
@jfr - we'd really need an example able showing the issue so we can see the code and understand why that might be happening. Something must be triggering a redraw.
Allan
Hi Allan
I have removed oTable.scroller.measure() that was causing the redraw
thank for your help