Data_editor write changed data back to DB

Hi,

I am looking for an example how to write back data to DB,
which got changed or deleted or new created in the data_editor.

The documention for data_editor does not have any information about that,
and I could not find any info somewhere else.

So, every tip or example how to handle that, would be great.

KR
Roland

Indeed the information is there but it is easy to miss from a cursory search:

Note that this page is linked from the docs for data_editor.

Hi Goyo,
thx.
I went through that page multiple times,
but I cannot see the topic/information,
how the data got written back to DB.

I only see, how it is handled in the dataframe/data_editor.
And I can follow the example how to see the edited_data.
So far so good…
But then I am missing a Submit button which will write back the data to DB
and maybe refreshes the data in the Pandas df…
I am looking for the information how to implement that.

Maybe I am blind to see the lines in that doc…

KR
Roland

There is no magic that writes the changes to the database. Just as you have to write code that reads the data from the DB, you also have to write code that writes the changes back to it. The details on how to do that will vary depending on the specifics of your database.

Hi Goyo,
thx again…
I think I am spoiled because of the usage of JMIX where I got all of that generated,
so that I only have to take care of the business logic and not of the standard stuff.

KR
Roland

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.