0

What i'm using; VB2008 express, Access 2003 DB,

Objective to clear the datagrid view after updating. This should happen when the user clicks the OK button "which confirms the update". Below is what I have. I see in some forums they use the .Clear and some other options so what would be my best way to complete this. I was advised to use the unbind method although how do I implement this? When i research the unbind it references to a DVD type scenario.

I currently have

Private Sub SaveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripMenuItem.Click
'This updates datsource

Try
Me.Validate()
Me.dellhose_DataBindingSource.EndEdit()
Me.dellhose_DataTableAdapter.Update(Me.DELLWHDataSet.dellhose_Data)
MsgBox("Update successful. Please instruct drivers on correct procedures.")

Catch ex As Exception
MsgBox("Update failed. Please contact IT support.")
End Try

End Sub

After this my project is complete.. This newbie can't wait.

Any help is appreciated..

1
Contributor
1
Reply
2
Views
6 Years
Discussion Span
Last Post by littlelou
0

I figured it out with a little help, sorry maybe i just posted in the wrong forum.

I first used
'worked too well. it cleared the DGV but then i was unable to use the query again
Me.Datagridviewname.bindingsource.("")
'this is what worked perfectly, it cleared the DGV and i was able to use the queries again.
Me.CUSTWHDataSet.Clear()

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.