Hi,
What I need to know is the first event which is executing right after I click the X but in my form's control box.
Here is the whole story:
I get the following error message when Clicking on X but of its control box:
System.ArgumentException: DataGridViewComboBoxCell value is not valid.
I know the filter that I set on this comboBox is causing the problem, so I need to reset this filter before I leave the form.
I tried to add the following code to "FormClosing" and "FormClosed" event, but the error keeps pupping up.
Me.MyBindingSource.Filter = ""
It seems that there are other events that are fiering before execution of my code.
Any comment and possible solution is highly appreciated.
Thanks,
Kia
What I need to know is the first event which is executing right after I click the X but in my form's control box.
Here is the whole story:
I get the following error message when Clicking on X but of its control box:
System.ArgumentException: DataGridViewComboBoxCell value is not valid.
I know the filter that I set on this comboBox is causing the problem, so I need to reset this filter before I leave the form.
I tried to add the following code to "FormClosing" and "FormClosed" event, but the error keeps pupping up.
Me.MyBindingSource.Filter = ""
It seems that there are other events that are fiering before execution of my code.
Any comment and possible solution is highly appreciated.
Thanks,
Kia