Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi guys ,
My problem is after delete an entity from the database my listview did not updated
please can you help me
Thanks
Posted

1 solution

Hi, Try this

1. Bind your ListView with an
ObservableCollection<t></t>
in XAML or at runtime with the Listview property ItemSource
2. Load your Data From your database in this ObservableCollection object you created
3. After Deleting the the entity in your database you have 2 choice. fisrt delete the entity directly from your ObservableCollection object (better performance but will ingnore change made by other user if your application run in an network environnement ) or second Reload your Data From your database in then ObservableCollection object.


HOPE IT'S HELP
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900