Results 1 to 3 of 3

Thread: [2005] Datagridview changes

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2007
    Posts
    362

    Question [2005] Datagridview changes

    How do i identify changes made in the datagridview while closing a form containing DGV? If the changes have been made then it must ask me to save or discard changes.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: [2005] Datagridview changes

    Is the grid bound? Is it bound to a DataTable. If so the table's GetChanges method will tell you. It will return Nothing if no changes have been made. If the grid is not bound or it's not bound to a DataTable then it's up to you to handle the appropriate event(s) to be notified when a change is made to the data and set a flag. You can then test the flag when you're closing the form.
    Last edited by jmcilhinney; Feb 2nd, 2008 at 03:05 AM.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2007
    Posts
    362

    Re: [2005] Datagridview changes

    Thank You.

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