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
454
Unable to convert from (null) to 'System.Nullable'1[System.Int32]
posted

Hi everyone,

anyone knows how to set the value of a UltraWinGrid cell to null (Nothing in VB.NET). I've tried this code but it does'nt work

For Each gridCell As Infragistics.Win.UltraWinGrid.UltraGridCell In gridCells 

     gridCell.Value = Nothing

Next

If the cell already contains the null value I don't receive any error message and everything works fine. But, if the cell contains a value (in that case an integer) I cannot set back the value to nothing and I receive this error message : Unable to convert from (null) to 'System.Nullable'1[System.Int32]

Anyone konws how to do such things???

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    What version of the grid do you have? Are you using the latest Hot Fix? There were some bugs in older versions when dealing with Nullable types.

    What kind of data source are you using for your grid?

    Have you tried:

    gridCell.Value = DBNull.Value

Children