Is there local editing for serverside datatables?
Is there local editing for serverside datatables?
I would like to do local editing in editor, but every time I edit something there is an ajax call after the draw; my table is set to serverside:true.
Common sense would tell me that serverside datatables need to render serverdata after changes but then again maybe local edits would apply to the current page.
I need operators to edit rows in a 9 thousand record table. They are doing inline edits on each row. It takes too long to wait for the ajax call per inline edit so I would like to send changes to the server with a button to the right of the column or if possible, draw the change in the local table immediately regardless of ajax response.
Answers
If you are using server-side processing, then yes, every draw of the table will make an Ajax request to the server. Fundamentally when server-side processing is enabled, DataTables is basically just a dumb display and event handler. The data is stored at the server-side, so any request to draw data needs to hit the server.
Allan
At 9k records, depending on the size of the row object, you might be okay with client-side processing, in which case you could do an editing queue.
Allan
Thanks for your reply Allan. Maybe if I prevent the draw it would work faster. Example, I edit a field, the server responds with the row (I would prefer something smaller, like a success) and then prevent that full page draw.
You can stop the draw from happening after an Editor update using the
drawType
option of theform-options
object. It does mean that any changes won't be reflected in sorting or filtering though.Allan