private void baseDataGridView1_CellValidating(object sender, DataGridViewCellValidatingEventArgs e)
{
if (e.ColumnIndex == 5 && this.baseDataGridView1.CurrentCell.IsInEditMode)
{
string sVal = this.baseDataGridView1.CurrentCell.EditedFormattedValue.ToString();
try
{
decimal.Parse(sVal);
}
catch (Exception)
{
e.Cancel = true;
MessageBox.Show("请输入数字!");
}
}
}