i am not able to reply to c-sharpcorner.com/Forums/when-i-add-new-item-to-observablecollection-is-not-sync-to-datagrid
so posting one more post
@Rajanikant but it seems now my problem is that when adding to the DB, I need to refresh the datagrid again, any suitable way of doing this without taking much time and resources ?
Naresh BeniwalPosted Oct 28, 2022, 4:54 PM
https://stackoverflow.com/questions/7008361/how-can-i-refresh-c-sharp-datagridview-after-update
Rajanikant HawaldarPosted Oct 2, 2022, 11:07 AM
The data you add to your DB just add it to the ObservableCollection as I do in the AddDataCommand, so something like:
The ObservableCollection automatically fires a GUI change when it contents are changed