Non-DB temp-tables.

Non-DB temp-tables.

rpmccormickrpmccormick Posts: 136Questions: 18Answers: 0

99% of everything I have done so far with datatables involves live data on a MySQL server, but I am in a situation where it would be nice to have "off-line" tables. Is such a thing possible? Please point me in the right direction and I will be happy to research, I just don't even know what to search for currently.

I have a popup-window (modal dialog) with a bunch of inputs and 2 empty tables. I want the user to be able to add items to the tables (using my own inputs and javascript), and to be able to inline-edit the fields in the tables with Editor after having added some rows. I catch is that I want 100% of this to remain on the client-side and not talk to my SQL server at all.

When they are all done and they hit the OK button to close the popup, only then will I save all the information on the popup to multiple DB tables (I can do all those INSERTS on my own by navigating the data property of DT). All I want is a working, initial-empty, DT+Editor that I can programmatically add rows to and it uses a variable in memory instead of an actual database.

If such a thing is even possible, please provide me with a link or two to get me started. Thanks.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    Answer ✓

    Hi,

    Yes it is possible, using the ajax option to override the Ajax call that Editor makes. But you then need to implement the client / server communication in Javascript. There is a simple example of this using localStorage available in the Editor examples.

    Editor itself doesn't implement any queuing, so you would need to implement that yourself. So in short, yes it is possible, but it could be a little bit tricky.

    Allan

  • rpmccormickrpmccormick Posts: 136Questions: 18Answers: 0

    Thanks for the localstorage link, that is just what I was hoping for. As long as editor can inline-edit things in localstorage, that will work perfect, and I will do all the saving myself after the popup is closed.

This discussion has been closed.