Adding rows and edditing rows...

Adding rows and edditing rows...

lifedaniellifedaniel Posts: 68Questions: 4Answers: 0
edited July 2014 in DataTables

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.

Replies

  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin

    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

  • lifedaniellifedaniel Posts: 68Questions: 4Answers: 0

    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

  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin

    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

  • lifedaniellifedaniel Posts: 68Questions: 4Answers: 0

    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?

  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin

    if I want to add some javascript like autofiller

    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

    or customize the css

    Sure - feel free to modify the CSS files as you require.

    add fields or remove an useless one

    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

  • Musab007Musab007 Posts: 1Questions: 0Answers: 0
    edited July 2014

    Thank you

  • lifedaniellifedaniel Posts: 68Questions: 4Answers: 0

    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)

  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    edited July 2014

    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

  • lifedaniellifedaniel Posts: 68Questions: 4Answers: 0
    edited July 2014

    Said nothin' Everything working atm. Thank you

    Daniel

This discussion has been closed.