Click here to Skip to main content
15,798,825 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi. I have a data gridview and it reloads after i send the form to taskbar by minimizing it and restore again by clicking the icon on taskbar. I know this action fires resize event but normally my resize method doesnt reload datagridview. Is there any additional event firing by sending the form to taskbar and regaining it.

What I have tried:

i tested resize method by resizing my form, no datagridview reload occured.
Updated 22-Mar-19 17:32pm

1 solution

User Controls, UWP Pages, "etc" will fire their "Loaded" events repeatedly; usually anytime it gets (re)"activated".

The first time, you need to set a flag (e.g. IsInitialized), and skip any "one-time" code subsequently (in events that fire on "Loaded").
Share this answer
leone 23-Mar-19 6:39am    
I didn't quite get it. datagridview seems to not have any loaded event. form has a "load" event but it doesnt fire after window minimize/restore action. by the way i forgot to say this is c#.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900