private void vendorDataGridView_CellBeginEdit(object sender, DataGridViewCellCancelEventArgs e) { if (!MyFunction.ColumnIDGood(vendorDataGridView, "columnVendorID", e.RowIndex)) { e.Cancel = true; } }
private void IngredientDataGridView_CellBeginEdit(object sender, DataGridViewCellCancelEventArgs e) { if (!MyFunction.ColumnIDGood((DataGridView)sender, "columnIngredientID", e.RowIndex)) { e.Cancel = true; } if (m_ShowValidatingWarning && e.Cancel) { MessageBox.Show("DataGridView的<食材內碼>不正確!"); } }