Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1710
WinGrid does not like empty strings
posted

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?

 

Parents
  • 469350
    Verified Answer
    Offline posted

    It sounds to me like your data source doesn't accept DBNull, only an empty string. If that's the case, you can fix this by setting the Nullable property on the column.  

Reply Children