private void RpDpFileListDeleteButton_Click(object sender, EventArgs e) { foreach (DataGridViewCell item in RpDpFileListDataGridView.SelectedCells) { // GlobalConfigDataSet.Tables[0].Rows.RemoveAt(item.RowIndex); if (item.RowIndex != -1) { RpDpBindingSource.RemoveAt(item.RowIndex); } } }
private void RpDpFileListAddButton_Click(object sender, EventArgs e) { // GlobalConfigDataSet.Tables[].Rows.Add(); try { RpDpBindingSource.AddNew(); } catch (System.Data.NoNullAllowedException) { MessageBox.Show( "Please input distance.", "Distance is null", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } }