Binding Navigator Movement Event Error
-
Hi, I'm starting to learn coding with vb .net and I'm having and issue while moving through registers using bindingnavigator. Let me explain: I have a function (already tested and works fine) that receives an idNumber from a textbox and returns a file path. If I call that function using
Private Sub BindingNavigatorMoveNextItem\_Click(sender As Object, e As EventArgs) Handles BindingNavigatorMoveNextItem.Click changeUser(usuarioTextBox.Text) End Sub
it calls the function with the textbox data before moving to the next register, and that's not what I would like to do. Any clues to solve this? Maybe I'm using and incorrect event? Thanks in advance
-
Hi, I'm starting to learn coding with vb .net and I'm having and issue while moving through registers using bindingnavigator. Let me explain: I have a function (already tested and works fine) that receives an idNumber from a textbox and returns a file path. If I call that function using
Private Sub BindingNavigatorMoveNextItem\_Click(sender As Object, e As EventArgs) Handles BindingNavigatorMoveNextItem.Click changeUser(usuarioTextBox.Text) End Sub
it calls the function with the textbox data before moving to the next register, and that's not what I would like to do. Any clues to solve this? Maybe I'm using and incorrect event? Thanks in advance
What do you mean by "register"? It's not a common term in the context of VB. And the "navigator" is typically used to move position in a "set of records". Moving between "text boxes" is usually via the Tab key. You want to do something with text in a Text Box? It's usually done in response to a "button click"; e.g. to query or save something.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food
-
What do you mean by "register"? It's not a common term in the context of VB. And the "navigator" is typically used to move position in a "set of records". Moving between "text boxes" is usually via the Tab key. You want to do something with text in a Text Box? It's usually done in response to a "button click"; e.g. to query or save something.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food
Hi, Sorry for not using the right terms, I'm not familiar with them and got confused translating. I'm using the navigator to move between records. What I was trying is to change a PictureBox Image every time the user moves using the navigator buttons. The path of the image is stored in db and contained in a textbox. The problem I have is that using MoveNext event, I get the value of the textbox prior to move; so I don't get the right image path. Thanks
-
Hi, Sorry for not using the right terms, I'm not familiar with them and got confused translating. I'm using the navigator to move between records. What I was trying is to change a PictureBox Image every time the user moves using the navigator buttons. The path of the image is stored in db and contained in a textbox. The problem I have is that using MoveNext event, I get the value of the textbox prior to move; so I don't get the right image path. Thanks
Be aware that the movenext event MAY fire twice once on leaving a record and once on entering a record (I have not tested this but found it with other events). You may need to test the content of the object passed to the event.
Never underestimate the power of human stupidity - RAH I'm old. I know stuff - JSOP