Add delegate to CollectionChanged

  • Thread starter Thread starter Alessandro Rossi
  • Start date Start date
A

Alessandro Rossi

I've developed a user control, and i want to use this
control in forms that has others controls linked to a
dataset (TextBox). I want to add a delegate to the
CollectionChanged event of the currencymanager of the
others linked control. My problem is: When i put the
usercontrol in the form (at design time), and i run the
application, if the bindings (of others controls) are
created before than my control, the delegate is not added
because my control is not yet created.
Do you know how can i solve this problem?
Thank you.
Alessandro Rossi
 
Allesandro,

I think that if you change your processing, then you can accomplish what
you want. You are using the CollectionChanged event to determine when the
controls attached to the currency manager have changed. Before you add the
event handler, you will want to check the currency manager and do some
processing on all the items already in the currency manager.

Hope this helps.
 

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

Back
Top