I'm trying to customize a drag-and-drop-created C# app for the first time. The app has a DataGridView in "Form1.Designer". Before the table is shown, I would like to make invisible all columns that have no data in them (all nulls). Someone (anyoneis) has kindly suppied me with the code to do that. However, I DON'T KNOW WHERE TO PUT IT!
If I include it in Form1.Designer, I find the data isn't actually loaded into the table yet, so no "rows" are found. (I also get a "Don't put anything here" message later...") And I can't put it in "program.cs", because it's static.
I might mention that anyonis's code referenced the table directly, and I need to reference the DataGridView (I think), so maybe that is my mistake...
I know this may be the dumbest question in the history of Experts Exchange, but where do I put my own code in this case?