I've problem with databinding in vb.net
The problem that i'm trying to set a text field of the databinding programmaticall y during runtime, the change appears on the form, but after save the new value is not saved to database, if i edit this field manually by the keyboard it is updated correctly.
here's my code, the Q_ID textbox is the filed belongs to HEADERBindingSo urce binding source, i try to set it by the value of newQ_id, anyone can tell me what is missing?
Private Sub Q_IDTextBox_Tex tChanged(ByVal sender As Object, ByVal e As System.EventArg s) Handles Q_IDTextBox.Tex tChanged
If newRecord = 1 Then
Q_IDTextBox.Tex t = newQ_id
newRecord = 0
Else
QueryQuestionai re()
End If
End Sub
Private Sub Q_HEADERBinding NavigatorSaveIt em_Click_1(ByVa l sender As System.Object, ByVal e As System.EventArg s) Handles Q_HEADERBinding NavigatorSaveIt em.Click
Me.Validate()
Me.Q_HEADERBind ingSource.EndEd it()
Me.Q_HEADERTabl eAdapter.Update (Me.CSIDataSet. Q_HEADER)
SaveQuestionair e()
End Sub
The problem that i'm trying to set a text field of the databinding programmaticall y during runtime, the change appears on the form, but after save the new value is not saved to database, if i edit this field manually by the keyboard it is updated correctly.
here's my code, the Q_ID textbox is the filed belongs to HEADERBindingSo urce binding source, i try to set it by the value of newQ_id, anyone can tell me what is missing?
Private Sub Q_IDTextBox_Tex tChanged(ByVal sender As Object, ByVal e As System.EventArg s) Handles Q_IDTextBox.Tex tChanged
If newRecord = 1 Then
Q_IDTextBox.Tex t = newQ_id
newRecord = 0
Else
QueryQuestionai re()
End If
End Sub
Private Sub Q_HEADERBinding NavigatorSaveIt em_Click_1(ByVa l sender As System.Object, ByVal e As System.EventArg s) Handles Q_HEADERBinding NavigatorSaveIt em.Click
Me.Validate()
Me.Q_HEADERBind ingSource.EndEd it()
Me.Q_HEADERTabl eAdapter.Update (Me.CSIDataSet. Q_HEADER)
SaveQuestionair e()
End Sub
Comment