Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

i am populating 10 text fields in a for loop.

 

the program waits till the the loop is through to populate all the text fields.

 

i want each one to populate in each iteration of the loop.

 

how can i make it update data at the beginning of each loop?

  • *Experts*
Posted

Put your code for populating the textboxes inside a subroutine.

Then just call this sub at the beginning of your For-loop code block.

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

Posted

ok, didn't work.

 

when i click a button, the method runs 10 queries.

 

originally i had the loop on the click event of the button, .. but i made a new method for the db query that returns an integer that i want in each text field.

 

either way i have to make a loop in the button click event to query the db 10 times.

 

this is in C#, but i also code in AVR.NET, and the method there i call is "do events"

 

anything like this for c#?

  • *Experts*
Posted

I don't know what AVR.NET is, but in Windows Forms applications

(C# included) you can call Application.DoEvents() to pause and let

Windows process some messages.

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...