I am struggling to modify what is a gridview update to a textbox update. Because VB.Net is new to me, all the syntax appears back to front to me. Can someone advise me, thanks
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
' cb = New MySqlCommandBuilder(DataAdapter1)
' Dim i As Integer = DataAdapter1.Update(ds.Tables("Mycontacts"))
' MessageBox.Show("modify the number " & i.ToString & " rows")
End Sub
I can understand that the integer i is referencing the row of the gridview control, but how I apply this to a textbox containing a current record foxes me, as there is no reference to a record ID or index of the textbox itself I'm lost. In trial and error I found with the grid I could rem out the messagebox line and it still updated (having no yes/no split in the messagebox line. Having Dim i as integer followed by the update command is foreign language to my past VB6 knowledge. Appreciate it very much if someone could enlighten me. Thanks
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
' cb = New MySqlCommandBuilder(DataAdapter1)
' Dim i As Integer = DataAdapter1.Update(ds.Tables("Mycontacts"))
' MessageBox.Show("modify the number " & i.ToString & " rows")
End Sub
I can understand that the integer i is referencing the row of the gridview control, but how I apply this to a textbox containing a current record foxes me, as there is no reference to a record ID or index of the textbox itself I'm lost. In trial and error I found with the grid I could rem out the messagebox line and it still updated (having no yes/no split in the messagebox line. Having Dim i as integer followed by the update command is foreign language to my past VB6 knowledge. Appreciate it very much if someone could enlighten me. Thanks