I have a grid that when populated may or may not have null values for a column that is a string.
If the data returned is already null everything works fine. If the string column had data and I step into the column and delete all the data I get a message stating that there is a Data Error - Unable to update the data value: Object of type 'System.DBNull' cannot be converted to type 'System.String'.
How can I allow a column to go back to a null value once it contained data?
I have the same problem
with error "Unable to update the data value: Object of type 'System.DBNull' cannot be converted to type 'System.Nullable`1[System.Decimal]'."
It seems the only way is to use CellError event, because I cann't change my Datatype filed to nullable value.
Ok, it seems i see the algorithm of solution.
I will change null value to 0 before leaving the edited cell.
Please tell me, how can I do it?
Hm...
"I will change null value to 0 before leaving the edited cell. Please tell me, how can I do it?"
Any suggestions?