Private Sub txtConLastName_ LostFocus(ByVal sender As Object, ByVal e As
System.EventArg s) Handles txtConLastName. LostFocus
Try ' Set up structured error handling.
vdsClientUI.Con tactByID.Rows(d gContacts.Curre ntRowIndex).Ite m("PersonLastNa m
e") = Me.txtConLastNa me.Text
objClient.Updat eContactByID(Me .vdsClientUI, "ContactByI D")
RefreshContacts Grid()
Catch ex As Exception ' Catch the error.
Me.blnErrorLogg ed = ErrorLog(ex.ToS tring) 'Log Error in DB
MsgBox(ex.ToStr ing) 'Show friendly error message.
Me.Close() 'Close Form
Finally
' Beep after error processing.
End Try
End Sub
Private Sub RefreshContacts Grid()
Try ' Set up structured error handling.
Me.dgContacts.D ataBindings.Cle ar()
vdsClientUI.Tab les("ContactSel ectAll").Clear( )
vdsClientUI.Tab les("ContactSel ectAll").Dispos e()
vdsClientUI.Tab les("ContactByI D").Clear()
vdsClientUI.Tab les("ContactByI D").Dispose( )
'Me.dgContacts. Refresh()
vdsClientUI = objClient.selCo ntacts(intClien tID,
Me.strEmploymen tConsultantSSN)
Me.dgContacts.S etDataBinding(v dsClientUI, "ContactSelectA ll")
Me.dgContacts.D ataBindings.Cle ar()
vdsClientUI = objClient.selCo ntactByID(intCl ientID,
Me.strEmploymen tConsultantSSN)
Catch ex As Exception ' Catch the error.
Me.blnErrorLogg ed = ErrorLog(ex.ToS tring) 'Log Error in DB
MsgBox(ex.ToStr ing) 'Show friendly error message.
Me.Close() 'Close Form
'Application.Ex itThread() 'Exit App
Finally
' Beep after error processing.
End Try
End Sub
"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message
news:eQ******** ******@TK2MSFTN GP11.phx.gbl...
Hi,
Post your code.
Ken
---------------------
"Aaron Ackerman" <no@spam.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..I have been having just on going problems with my MS Datagrids. I have NO
idea what I am doing wrong.
What is esentially happening is that say I have three records in my
Dataset.
I click on the third row to populate the textboxes below the grid that
correspond to the various columns in the grid. The textboxes fill. I
edit the data in one of the textboxes. As I lose focus I update the dataset
and refresh the grid.
Well the third row refreshes just fine. But I also fine that the first
row in my dataset also gets updates WITH ALL OF THE DATA FROM THE THIRD
ROW??? I
have traced the dataset all through the update and cannot for the life
of me
see where this happens. It seems to happen behind the scenes somewhere
through the databinding.
Anyway it is driving me nuts. Any ideas.