locked
Refresh DGV that filled by Entity Framework without saving new added records to SQL (VB.Net) RRS feed

  • Question

  • I have a DGV on my form that filled by Entity Framework from SQL. User must can adds some new records to entity of DGV by a textbox.
    and my problem:
    when I add new records, I cant see the changes  in my DGV without saving the changes to SQL!!

    Is there any way to make all changes and see them immediately in DGV then save all changes to SQL?


    • Edited by R. Salehi Monday, June 3, 2013 7:12 PM
    Monday, June 3, 2013 7:10 PM

All replies

  • How are the records being added?  Are you using WPF?


    JP Cowboy Coders Unite!

    Monday, June 3, 2013 9:48 PM
  • How are the records being added?  Are you using WPF?


    JP Cowboy Coders Unite!

    Thanks for your reply.
    New records added by double clicking on an other DGV records.
    For example:

        db.MyTable.Add(New MyTable With {.Pos_No = DGV1.CurrentRow.Cells(0).Value}

    I want to see added records to DGV immediately without saving the changes on SQL.

    Tuesday, June 4, 2013 3:46 AM