Insert and update in DLinq DataGridview

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andrus

    Insert and update in DLinq DataGridview

    I tried to edit data in DataGridView.
    Insert and delete operations in grid are not saved to database. Updating
    works OK.

    How to force grid to save Insert and Delete operations also ?

    Andrus.

    Northwind db = CreateDB();
    var list = new BindingList<Cus tomer>(db.GetTa ble<Customer>() .ToList() );
    DataGridView grid = new DataGridView { Dock = DockStyle.Fill, DataSource =
    list };
    Form f = new Form { Controls = { grid } };
    Application.Run (f);
    db.SubmitChange s();


Working...