Keeping Selection / Sorting when Changing / Refreshing Dataframe

Hi,

I have the following issue. I want to create a master detail page containing a master column with a dataframe and a detail column with some fields to change the displayed data. The data comes from a mysql database.

My problem is that when I change the data in the detail view in the database, the dataframe refreshes automatically when I change the selection. This is ok so far, but after refresh the sorting of the dataframe and the selection I clicked is lost.

Is there a way to keep the selection and sorting of a dataframe when the data is changed? Or do you know an example for a master detail app?

Thank you

Michael