Can you update/add records in SQL using a datagridview and LINQ to SQL
- by Jordan S
Is it possible to bind a DataGridView to a LINQ to SQL class so that when I make changes to the records in the datagridview it automatically updates the SQL database?
I have tried binding the data like this but if I make changes to the data in the datagrid view they do not actually affect the data in the database...
BOMClassesDataContext DB = new BOMClassesDataContext();
var mfrs = from m in DB.Manufacturers
select m;
BindingSource bs = new BindingSource();
bs.DataSource = mfrs;
dataGridView1.DataSource = bs;