Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
235
Refreshing WinGrid in Windows Form App
posted

I am using Entity Framework to communicate with an SQLServer database and am using WinGrid to view the database records. To edit, add or delete a record, I call up a separate detail form. If I am editing or deleting a record, when the changes are made, the WinGrid reflects the changes immediately and the altered record appears in the grid (or disappears in the case of a delete). When adding an new record, however, the record is not visible in the grid after performing a "SaveChanges()" command to save the new record to the database. If the program is closed and then restarted, the record appears in the grid as it should. I have tried every refresh command I can think of on all of the components, including the grid, the bindingsource and the EF components and nothing works to show the new record in the grid.

Any suggestions?

 

Parents Reply Children
No Data