Infragistics Error When Closing Form
When using the Infragistics grid control on a windows form, user sometimes gets the following error message: "ExceptionMsg=System.InvalidCastException: Unable to cast object of type 'Infragistics.Win.ToolTipFormEx' to type 'xxxx'."
This is due to a bug in the Infragistics grid.
The fix is to dispose of the grid object in the FormClosing() event of the form.
private void MyForm_FormClosing(object sender, FormClosingEventArgs e) { if (this.myGrid != null) { this.myGrid.Dispose(); } }