or




foreach (GridViewRowInfo row in gridView.Rows){ row.Cells["bool_helper"].Value = false; }this.gridView.MasterView.TableHeaderRow.Cells[0].Value = false;private MyEntities dbContext = new MyEntities();private void ManageClientsForm_Load(object sender, EventArgs e){ radCheckBox1.DataBindings.Add("IsChecked", bindingSource1, "active"); Client c = (from c in dbContext.Clients where c.Id = 1000 select c).First(); bindingSource1.DataSource = c;}private void radButton1_Click(object sender, EventArgs e){ if (bindingSource1.DataSource == null) { return; } Client c = (Client)bindingSource1.DataSource; bool hasChanges = (from c in dbContext.ChangeTracker.Entries<Clients>() where c.Entity == c & c.State != System.Data.Entity.EntityState.Unchanged select c).Any(); if (hasChanges) { dbContext.SaveChanges(); }}
