Automatically set empty (numeric type) datagridviewcell value to 0 on datagridview

  • Thread starter Thread starter Skypea
  • Start date Start date
S

Skypea

Guest
Hello! i make an application with datagridview and datatable as datasource. I try to delete the value of a cell and when I leave that cell, I got an error message "Input string was not in a correct format" from dataerror event. This column has numeric datatype. My question is, how to automatically set the value of that cell to 0 when user delete the value and leave that cell? I try to set the null value of the DataGridviewColumn to 0 and set the DataColumn defaultvalue to 0 on the datatable, but i still get this error message. any solution?

Continue reading...
 
Back
Top