Inline editing for server side processing (fnAddData fail)

Inline editing for server side processing (fnAddData fail)

boopageboopage Posts: 5Questions: 0Answers: 0
edited July 2013 in General
Hi,

Im having problems with inline editing when using server processing. (bProcessing: true, bServerSide: true). The example followed: http://datatables.net/blog/Inline_editing. I cannot see how could this work when using fnAddData to add new rows, as it will redraw the table by sending request to the server side, and the new row is lost. By setting the second parameter to false it will prevent from redraw and add the row to the data source, BUT how can I get the new row to display? Is there a way we can redraw the table locally by manually setting it?

Thanks
Leo

Replies

  • allanallan Posts: 63,512Questions: 1Answers: 10,472 Site admin
    The documentation for fnAddData specifically says:

    > if you are using server-side processing (i.e. "bServerSide": true), then to add data, you must add it to the data source, i.e. the server-side, through an Ajax call.

    Or in other words, fnAddData is utterly useless when using server-side processing.

    What you need to do is add it to the data source (i.e. the server) and then call fnDraw to update the table.

    Allan
This discussion has been closed.