CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2005
    Posts
    37

    Angry DataGridView changes not saving!

    Hey Guys,

    I am writing an app with Visual C# Express and have put a DataGridView on my form.
    It pulls data from an Access database and displays it fine, but when I edit, add, or delete a record from the DataGridView control the changes "appear" to have taken, however once I close the app and reopen or check the Access database none of the changes have taken affect.

    I didn't write any insert, update or delete statements as I thought that funtionality came out of the box with the DataGridView. ReadOnly is set to False and everything seems to be set right.

    I have also tried this with VS 2005 and am having the same results by the way.

    Could someone please help me with this?

    Thanks,
    Chris

  2. #2
    Join Date
    Jun 2005
    Location
    Maryland,USA
    Posts
    20

    Re: DataGridView changes not saving!

    You have to write your own handlers for adding,deleting or updating the database based on what action is selected in the grid.That functionality does not come built-in.The grid only provides events for them.You have to write the code inside them yourself.

    hope this helps.

    CafeDreamz.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured