private void dataGrid1_CurrentCellChanged(object sender, EventArgs e) { GenreItem gi = (GenreItem)dataGrid1.CurrentItem; gi.Check = !gi.Check; dataGrid1.Items.Refresh(); }
private void dataGrid1_CurrentCellChanged(object sender, EventArgs e) { dataGrid1.Columns[1].IsReadOnly = true; try { GenreItem gi = (GenreItem)dataGrid1.CurrentItem; if (gi.Genre != null) { gi.Check = !gi.Check; dataGrid1.Items.Refresh(); } } catch { dataGrid1.Columns[1].IsReadOnly = false; } }