An error occurred while refreshing the data from field 'Services.unitset_id' to property 'SelectedValue' on control 'editUnitSet.'
When I open the page from menu. I have seen the added record.
The line from my code shows that unitset_id gets value.
((Services)component).unitset_id = (Nullable<System.Int32>Value; (Error : Specified Cast is not valid.)
But message says control gets value ;
"An error occurred while refreshing the data from field 'Services.unitset_id' to property 'SelectedValue' on control 'editUnitSet.'"
I don't see anything past an invalid cast exception. Why can't you just return an alternate value on Null so that a valid value is returned to the grid? I do not believe this to be a BBS or BO "bug" or "issue" but rather how it is designed. If the control to which you are binding doesn't support a null value being returned, then you would want to ensure that it can be cast by supplying a valid value. Just from looking at your code snippet and stack trace, this is what I would recommend.