Results 1 to 3 of 3

Thread: [RESOLVED]datagridview isdirty .

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2008
    Posts
    166

    Resolved [RESOLVED]datagridview isdirty .

    hi guys! i need your help. how will i able to know if the datagridview values has changes? i want to trigger it in button close, and i want to ask the user if he or she wants to save the changes.. thanks!
    Last edited by hoobas20; Jul 7th, 2008 at 11:07 PM.

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

    Re: datagridview isdirty .

    The grid itself has no idea whether its data has changed or not. If you're bound to a DataTable you can call its GetChanges method and if it does not return null then some data has changed. If you're unbound or bound to some other list that doesn't tell you itself then you'll need to remember yourself by setting a flag when the grid raises a CellValueChanged event.
    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
    Addicted Member
    Join Date
    Jan 2008
    Posts
    166

    Resolved Re: datagridview isdirty .

    thanks!! you're so great!!!

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