Deleting Row from Listview and TinyDb

Good morning, I ask you for a little help I have to delete a row from a listview and also delete it from the TinyDB db, can you kindly indicate the operations to do. I attach my code. Thanks to all.

Where in TinyDB?

This is wrong method i hope.

When screen init
Set listview items to get tinydb data

After listview picking
Set global or temp list to get tinydb data
Remove items from the list {list - get local/temo list} index {listview selection index}

Or

Set global or temp list to get tinydb data
Remove items from the list {list - get local/temo list} index {index is in the list list get local/global list item listview selection}

In both the method after the removal

Call tinydb save tag (use same tag) value get local/global list

Good morning and thank you for your contribution, but I kindly ask you if you could post me the blocks of the removal of the row from the listview and the relative deletion in TinyDB. Unfortunately I was not able to do it. Thanks again. With a practical example it is better!

Why?

You are populating the items from the listview

After picking
Deleting the picked item from listview then saving in tinydb

My block is also doing the same. But i am deleting thw item from tinydb then populating in the listview

Ciao Paolo,
qui c'è un'incongruenza:
image

"Selection è il testo dell'item selezionato mentre tu cerchi di cancellare un index, quindi devi usare il blocco ListView1_Numeri_Nomi.SelectionIndex.

PS è sempre per la tua lista di telefoni ? Se sì, hai cambiato il ListPicker con il ListView ?

try this simple one

1 Like