Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

System.ArgumentException: DataGridViewComboBoxCell value is not valid.

Status
Not open for further replies.

KiaKia

Programmer
Mar 30, 2008
59
0
0
US
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

 
That exception occurs when the value you put in the field containing the combobox isn't a member of the combobox.

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top