Adding rows and edditing rows...
Adding rows and edditing rows...
lifedaniel
Posts: 68Questions: 4Answers: 0
Hello, I'm using datatables, and I use it with the server side. I would like to know how can I can add (server side) rows so the datatable refresh automaticly and I can edit or delete rows (also server side) automaticly (ajax and mysql so).
Thank you very much.
This discussion has been closed.
Replies
This Editor example shows server-side processing being used with insert, edit and delete functionality.
Basically it boils down to the fact that you need to update the database and then redraw the table. The big question is how to get the data to the server to insert, update or delete as required. Editor is my solution for that.
Allan
Hello thank you for your answer. The trouble is I can't get working the editor with the server-side option. Do you have a solution somewhere ? Thank you
The example I linked to shows Editor working with server-side processing, so it should be possible to do.
Can you link me to your page so I can take a look and see what is going wrong?
Allan
It's working now but the problem is when you edit or add, there's a big lack of customisation, if I want to add some javascript like autofiller, or customize the css, add fields or remove an useless one. It's possible you think?
There is an AutoComplete plug-in for Editor available: https://editor.datatables.net/plug-ins/field-type/editor.autoComplete
The manual also describes how you can create your own field types: https://editor.datatables.net/manual/development/field-types
Sure - feel free to modify the CSS files as you require.
A bit like the CSS, add and remove fields from the code as you require. Obviously there would be no use to Editor if you weren't table to set your own fields.
Allan
Thank you
Hello tank you for your help, I would like to know how it could be possible to add inline buttons like this : http://image.noelshack.com/fichiers/2014/31/1406720932-datatable.png
thank you very much.. (my buttons aren't working properly)
Like this: https://editor.datatables.net/examples/simple/inTableControls.html .
edit - obviously that is if you are using Editor. You could do something similar if you aren't.
Allan
Said nothin' Everything working atm. Thank you
Daniel