VB.NET2010表格DataGridView2_CellValidating事件中
If e.RowIndex >= 0 And IIf(IsDBNull(DataGridView2.CurrentCell.Value), "", DataGridView2.CurrentCell.Value) <> e.FormattedValue Then...
当我删除当前单元格内容时,
如果针对字符型字段OK,但是针对数值型字段出错提示如下:
从字符串“”到类型“Double”的转换无效
我试着改为:
If e.RowIndex >= 0 And IIf(IsDBNull(.CurrentCell.Value), 0, .CurrentCell.Value) <> e.FormattedValue Then...
还是提示错误,怎么破?