The code looks perfect. The issue maybe because of bug in .net framework. Can some expert confirm this ?
One workaround to avoid the exception is - store default value of "ProductType" proptery if SelectedValue is NULL.
For example, if default value of ProductType is -1 then,
cmbProduct.DataBindings["SelectedValue"].DataSourceNullValue = -1;
Hope, this helps!
Robin
Robin
2010-08-23 09:57:00