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 ?

Rajanikant HawaldarRank #110 · 20.2K reputationPosted Oct 2, 2022, 7:07 AM EDT
The data you add to your DB just add it to the ObservableCollection as I do in the AddDataCommand, so something like:
var data = new Data(); db.add(data); Data.add(data);The ObservableCollection automatically fires a GUI change when it contents are changed
Naresh BeniwalRank #365 · 6.8K reputationPosted Oct 28, 2022, 12:54 PM EDT
https://stackoverflow.com/questions/7008361/how-can-i-refresh-c-sharp-datagridview-after-update