In fact, I did not detect the problem before, but one put on the test hand on the out, the reason I know where to change what things, but people do not know AH. The error is as follows:
---------------------------DataGridView Default error dialog box---------------------------The following exception occurred in DataGridView: System.Exception: Is not a valid value for Decimal. --->system.formatexception: The input string is not in the correct format. In System.Number.StringToNumber (String str, NumberStyles options, Numberbuffer&Number , NumberFormatInfo info, Boolean parsedecimal) in System.Number.ParseDecimal (String value, NumberStyles option S, NumberFormatInfo numfmt) in System.ComponentModel.DecimalConverter.FromString (String value, NumberFormatInfo FormatInfo) in System.ComponentModel.BaseNumberConverter.ConvertFrom (ITypeDescriptorContext context, CultureInfo Culture, Object value)---the end of the inner exception stack trace---in System.ComponentModel.BaseNumberConverter.ConvertFrom (ITypeDescriptorContext context, CultureInfo culture, Object value) in the System.ComponentModel.TypeConverter.ConvertFrom (object value) System.Windows.Forms.DataGridView.DataGridViewDataConnection.PushValue (Int32 boundcolumnindex, Int32 columnindex, Int32 RowIndex, Object value) to replace this default dialog box, handle the DataError event. ---------------------------Determine---------------------------
Workaround, register a dgv_dataerror event to be able.
private void Dgv_dataerror (object sender, Datagridviewdataerroreventargs e)
{
Can not execute code OH
}
The following exception occurred in DataGridView: System.Exception: Is not a valid value for Decimal. ---> System.FormatException: The input string is not properly formatted.