We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

How do I stop auto refresh of datagridview

Buhrj1
Buhrj1 asked
on
Medium Priority
1,533 Views
Last Modified: 2013-01-22
I am having a problem with my datagridview reloading. I am working in VB.NET 2008 using Access 2007 as my database. I have two forms each with a datagridview one them. One is for current records and one is for old records. On form load the current date is checked to determine if the record is current, see following code

Private Sub frmShowArchieve_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load  

Dim dtHoldDate As Date
dtHoldDate = System.DateTime.Today  
Dim adapter As New SecurityDataSetTableAdapters.se00t01aTableAdapter  
Dim dv As New DataView(adapter.GetOldData)  
With dv  
  .RowFilter = "accto < #" & dtHoldDate & "#"
End With
dgvArchieve.DataSource = dv  

End Sub

My problem is that sometimes the user wants to change the accto date to make the record active again. The user changes the date but as soon as the row loses focus the record disappears from the datagridview. Naturally now the record cannot be updated because it is no longer in the datagridview. I have done extensive searching on the internet and have not been able to find the answer to this issue. Can anyone please tell me how to solve this issue.

Thank you in advance for all your help.



Comment
Watch Question

Sr. Developer
CERTIFIED EXPERT
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.