Reloading DataGridView

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LegalIT
    New Member
    • Feb 2008
    • 15

    Reloading DataGridView

    Hello,

    I am using VB.net.

    I have a DataGridView that is loaded with a transaction history from a database by a call to a subroutine called LoadHistory(). I have three buttons that open new forms, one allows a transaction to be edited, one allows a transaction to be added and one that allows a transaction to be deleted. The transaction changes are being correctly loaded into the database. When I close the forms I would like the DataGridView to be reloaded with the changes. I tried to put a call to LoadHistory() after my database change. I tired putting the call on the Leave event and Form Closed event. I can't seem to get my DataGridView reloaded without stepping to the next record and then back again.

    Any suggestions?
  • lotus18
    Contributor
    • Nov 2007
    • 865

    #2
    Originally posted by LegalIT
    Hello,

    I am using VB.net.

    I have a DataGridView that is loaded with a transaction history from a database by a call to a subroutine called LoadHistory(). I have three buttons that open new forms, one allows a transaction to be edited, one allows a transaction to be added and one that allows a transaction to be deleted. The transaction changes are being correctly loaded into the database. When I close the forms I would like the DataGridView to be reloaded with the changes. I tried to put a call to LoadHistory() after my database change. I tired putting the call on the Leave event and Form Closed event. I can't seem to get my DataGridView reloaded without stepping to the next record and then back again.

    Any suggestions?
    Are you referring Transaction History to an Audit Trail? If yes, I think it is not a better idea that the Transaction History to be edited.

    Comment

    • LegalIT
      New Member
      • Feb 2008
      • 15

      #3
      Originally posted by lotus18
      Are you referring Transaction History to an Audit Trail? If yes, I think it is not a better idea that the Transaction History to be edited.

      It is just a history log of task assignments. Sometimes the person who was assigned the task is busy so someone else does the task. In this case the manager wants to be able to go in and change the "history".

      Comment

      • VBWheaties
        New Member
        • Feb 2008
        • 145

        #4
        Originally posted by LegalIT
        Hello,

        I am using VB.net.

        I have a DataGridView that is loaded with a transaction history from a database by a call to a subroutine called LoadHistory(). I have three buttons that open new forms, one allows a transaction to be edited, one allows a transaction to be added and one that allows a transaction to be deleted. The transaction changes are being correctly loaded into the database. When I close the forms I would like the DataGridView to be reloaded with the changes. I tried to put a call to LoadHistory() after my database change. I tired putting the call on the Leave event and Form Closed event. I can't seem to get my DataGridView reloaded without stepping to the next record and then back again.

        Any suggestions?
        Are we taking your word for it that LoadHistory() definitely works? Or is that where you are having the issue? I would post here LoadHistory() because, in VB.NET, there are many strategies for updating databases and then retrieving latest results.

        Comment

        Working...