In a form I am displaying a datagrid with data from a users table. I have a delete button which works and after the deletion is done I redo the query and reset the itemssource to show the new contents.
It seems that seldom is the row actually gone although very occasionally it is. If I leave the page and come back it shows what is actually in the database. I also have an adduser form where I insert a new record then go back to the same userlist. Rarely the new user appears unless I leave the page then reload yet again.
That suggests to me that the database takes longer to delete or insert than it does to select and show in the datagrid. Is that a reasonable assumption? If so is there some way I can find out when the database is done and redo the datagrid contents at that time?
Or maybe something completely different is happening?
It seems that seldom is the row actually gone although very occasionally it is. If I leave the page and come back it shows what is actually in the database. I also have an adduser form where I insert a new record then go back to the same userlist. Rarely the new user appears unless I leave the page then reload yet again.
That suggests to me that the database takes longer to delete or insert than it does to select and show in the datagrid. Is that a reasonable assumption? If so is there some way I can find out when the database is done and redo the datagrid contents at that time?
Or maybe something completely different is happening?