I have a C# 5/.NET 4.0 app with DataGridView objects in a Windows Form object. The data is queried from the DB and the form load event has <datagridviewobject>.AutoGererateColumns = true; which I follow with <datagridviewobject>.Columns[<string name of column>].Visible = false; for the columns I do not want the user to see but need to push data into before updating the DB.
If I typo the column name, the form load event terminates at that point and no error state is raised and initially one believes that all is well until the results of the code below the errant line are needed.
This took me a long time to trouble shoot!
Is there a way to have such a mistake raise an error?
Newark IT Guy...