I have the following code in my project, deleteselector is a form that has a datagridview (with autosize columns) on it.
try
{
if (deleteSelector.ShowDialog() == DialogResult.OK)
{
}
}
catch (InvalidOperationException)
{
//Bug workaround
}
The try catch is because a pop-up form with a gridview on it trows a invalidoperationexception once in a while. This is the suggested workaround, see
Earlier, I used Show on the deleteSelector, and the workaround worked perfectly. Now, with showdialog it seems that the error is not catched anymore (I get an uncatched error message). Why is the error not catched?