I've bound my combobox so that the value selected will appear on the datagridview. However, although the datagridview is editable, the changes made won't save back to the database even is I use db.SaveChanges(). Is there another method?
private void cboeCID_SelectedIndexChanged_1(object sender, EventArgs e) { var CID = Convert.ToInt32(cboeCID.Text); using (var db = new Entities2()) { var course = from c in db.Student_Course where c.CID == CID select new Class1 { SID = c.SID, Mark = c.Mark }; editDataGridView.DataSource = course.ToList(); }