Listview update with items from SQL

Upon initialize screen we fill the listview with items retrieved from SQL (this works fine).
In listview we select one item to be deleted (this works fine and we can see in the SQL DB that it has been deleted), but the listview is not immediately updated even though we re-fetch the new list of items from SQL and fill the listview (meaning that the deleted item is deleted from the SQL, but still present in the listview). It needs a couple of screen refresh before the listview is updated correctly. Does anyone have a suggestion about this problem?

Are you setting the SQL items to a list, then using that list to set the listview elements?

If so, update the list when you select to delete, then reload the listview with the list as elements

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

It works! Thank you TIMAI2!!!

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