Backgroundworker Question

A

adebiasio

Hello. I have in my application a user control that list account
information like name and balances. This user control can be
initialized several times in my application. The account information
can change various ways.

My question is would can I update multiple instances of this control
with the updated data. When an instance is intialized in the Sub New
event I retrieve the present data from the database. My user control
contains a listbox. If for example, in one instance of the listbox I
change the label of the name of the account, how can the other
instances be updated.

I was reading up on the backgroundworkder process to see if it would
be of any help. Do you think I am on the right track?

Thanks!
 
B

Branco

adebiasio said:
Hello.  I have in my application a user control that list account
information like name and balances.  This user control can be
initialized several times in my application.  The account information
can change various ways.

My question is would can I update multiple instances of this control
with the updated data.  When an instance is intialized in the Sub New
event I retrieve the present data from the database.  My user control
contains a listbox.  If for example, in one instance of the listbox I
change the label of the name of the account, how can the other
instances be updated.

I was reading up on the backgroundworkder process to see if it would
be of any help.  Do you think I am on the right track?

Nopes, the BackgroundWorker has nothing to do with synchronizing
information between different parts of your code. It is used as an
easy way of implementing *background threading* work (i.e. to execute
some heavy work without tying up your user interface).

You will probably get what you want with Data binding. As long as all
the controls are bound to the same data source, updating one will
update all the others. Now, what you must figure out, I guess, is how
to provide a datasource to the internal list box used by your
control.

Hope this helped.

Regards,

Branco.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top