private void Mark() { if (bdsViewPh.Position < 0) { return; } if (dgvViewPh.Columns[dgvViewPh.CurrentCell.ColumnIndex].Name != "LOCKED") { if (dgvViewPh.Columns.Contains("Mark")) { drCurrent = ((DataRowView)bdsViewPh.Current).Row; drCurrent["Mark"] = !(bool)drCurrent["Mark"]; dgvViewPh.Refresh(); } } }