I have a Datagrid , 2 textBoxes and 4 buttons whenever I change positions or add a new controls , It gives errors form my grid variable saying it is not in current context . I am creating a window Application and using WinForms. I dont use any threads to Design
Share
It sounds like you may be running into a pretty common issue. ..
The designer will execute any code found in the constructor and, if IIRC, the Load event.
Simple way to do this without rearranging all your code to guard any code that isn’t purely (and I mean purely) layout code with a check to the form or control’s DesignMode property…