Click here to Skip to main content
15,885,366 members

Comments by Ismael Oliveira 2021 (Top 7 by date)

Ismael Oliveira 2021 22-Jun-21 17:54pm View    
Ok, OriginalGriff.
Thank you for your help!
Ismael Oliveira 2021 21-Jun-21 18:21pm View    
Ok, OriginalGriff. I understood. Now, if my control has two textBoxes and one label (eg. Tb1, Tb2 and Lb1) how can I extract the contents of Tb2? Thanks again.
Ismael Oliveira 2021 21-Jun-21 12:51pm View    
There are, in fact, 2 problems. First, when I create the form, and insert the user control n times, it's ok to insert the correct data, but even changing the location of each user control at the end only the last one appears. To use this user control (which I called camposBanco) I insert it once and it receives a name (camposBanco1). Then, during programming, I insert the component inserted into the project (camposBanco1). So when I change the location, the original object changes. See my code.
The second problem: when user clicks OK, I must look all Code fields (textboxes), and update the DB with the contents of the balance field. As you suggested, I must use a foreach, right? But it's complicated, because inside this foreach I must make a loop. If you were develloping this, how would you do?
What am I doing wrong? If you can, please hep me. If you think it's annoyng for you, let it go. Thanks again.
Ismael Oliveira 2021 21-Jun-21 10:38am View    
I have a form where the client sees his bank accounts and his dayly balance. The label receives the bank name. One of the textboxes receives the balance and the second textbox receives tre bank code. The client can update the values. As I don't know in how many banks he has accounts, in the form, programatically, I insert a number of textboxes and labels equal to his bank accounts. When he clicks OK I must save the values in the DB. That's why I need the nams of the textboxes. Can you help me? Thanks.
Ismael Oliveira 2021 20-Jun-21 20:53pm View    
Hi, OriginalGriff.
I tried your suggestion, and I had another problem: when I insert the user control via programming, its name is always the name of the control: camposBancos1. So I don't know how to differenciate each instance. How is it possible to have different names for these instances?
Thanks.