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
  • 469350
    Offline posted

    Hi,

    I'm not sure I understand the problem. If you want the user to be able to blank out a numeric cell, then you must use a DataSource which can support a null value in a numeric field. If you are using a DataSet/DataTable, then as long as AllowNull is true on the DataColumn, you will be able to set the cell's value to DBNull.Value.

Children