CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: DataGridview update and Datagridview refresh

  1. #1
    Join Date
    Nov 2014
    Posts
    2

    DataGridview update and Datagridview refresh

    What would be the similarities and differences in DataGridview.Update() and Datagridview.Refresh() methods

    What are the places to use DataGridview.Update() and Datagridview.Refresh()


    I'm referring to datagridview1.update() and datagrdview1.refresh() methods calling after the data source is set , what would be the best sequence of calling above 2 methods, what is the correct way

    datagridview1.DataSource = new List.......
    datagridview1.Refresh();

    or

    datagridview1.DataSource = new List.......
    datagridview1.Update();

    or else when to use datagridview1.Update() or datagridview1.Refresh();

    what is the underlying theory behind the Refresh and update methods calling , since it is bit confusing

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: DataGridview update and Datagridview refresh

    Use datagrdview1.refresh() if it is hidden by something else, but no data changes. Update causes auto-refresh
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Nov 2014
    Posts
    2

    Re: DataGridview update and Datagridview refresh

    ok, thanks for reply, i got the point but , but what mean by "if it is hidden by something else "

Tags for this Thread

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)