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
885
BeforeCellUpdate, null for numeric column value
posted

I am using this event (BeforeCellUpdate) to validate user grid entry and e.cancel=true if violation found and exiting event.  Works Ok in general. However I am having issue with numeric columns and nulls, for example user need abilities to null current cell value and leave it blank. Your grid instead of null applying 0, we would like to know what would be best to do so besides using text type instead of numeric for column. Thanks!

Parents
No Data
Reply
  • 69832
    Offline posted

    UltraGridColumn exposes a Nullable property which gives you a way to specify what value is sent back to the data source when a cell's contents are cleared. You can set this to (for example) 'Null', but the fact that the column did not automatically pick that value up leads me to believe that the underlying DataColumn is not nullable (AllowDBNull returns false), in which case there will be an error when the cell is updated.

Children