Defer render
Defer render
cala
Posts: 52Questions: 15Answers: 0
Hi!
Is it possible to defer render also when server processing is in use? In the example is always only with ajax that load data:
$(document).ready(function() {
$('#example').DataTable( {
"ajax": "data/arrays.txt",
"deferRender": true
} );
} );
Thank you!
This discussion has been closed.
Answers
yes...
read the example, please!!!
http://datatables.net/examples/server_side/defer_loading.html
Deferred loading is slightly different from rendered rendering. Deferred rendering has no meaning when server-side processing since only the rows required for display will be created by definition.
Allan
So I must only "preload" the first 10 rows in the html and set "deferLoading" to the max num of row in my table?
Another thing: this affects the performance of the Editor? I've tried with 1000 rows and is ok, 5000 is very slow, also the loading of new/edit window.
Thank you!
If you want to use the deferred loading feature then, yes, that is the correct way to do it.
Server-side processing should be very fast. If it isn't for you, can you link to the page showing the issue please.
Allan
Is it possible to create the "preview" html with child rows?
the site is on a private server, I cannot link you the page.
If needed, I can give you the debugger link: http://debug.datatables.net/onemeh
I see now that in the debugger that the processing is client side... maybe that is the problem.
Only if I set
instead of
the processing become server side, but in this case, no data is shown in the table...
Try
serverSide
(note that capitalisation!).Allan
Yes... I use it capitalized. I wrote the message in hurry yesterday.
Could you explain me the difference between putting the b or not?
However this morning I've reloaded the page and yes, data are loaded with a little delay, the pager is shown, but all the 1000 row are shown, instead of 10.
The
bServerSide
option is legacy - that is the format that was used prior to DataTables 1.10. v1.10 introduced camelCase option names, which are used in the documentation - e.g.serverSide
. Both will work in 1.10.Sounds like your server-side script is returning too many rows in that case. It should only return the number that DataTables requests. Is your LIMIT being correctly applied?
Allan
Great... but... why do they have 2 different behavior? I have to correct the behavior when I set severSide= true, because filtering, ordering nor paginating is working...
How can I set it?
however: this is my js conf file (if can help):
Thank you for the help!
So people who were using the 1.9 list of options can upgrade to 1.10 without everything breaking.
It would be applied in whatever
server_processing_editor_3tab.php
is.Allan