pogonophobia
pogonophobia
CC#
Created by pogonophobia on 5/5/2023 in #help
❔ My datagrid view is not refreshing instantly (WinForms)
After doing the button update function and populating the database, the data grid view is supposed to refresh but it doesn't. I've tried .refresh() and .invalidate() and .update() but those don't work either. Even if I add a manual refresh button, pressing on that won't show the newest database information. Only by going to another form then returning to this form does the new data show. I tried setting the datasource of the grid to null, that didn't work either. I also made it so that the entire form is destroyed and remade after insertion, it updates but it remains 1 update behind each time. So like If I update with 1 it wont show immediately, but if I update with 2 1 will show and 2 will show when I do the next update. Very weird indeed. I have another form with pretty much the same code and it works properly. Code is attached I think.
2 replies