473,387 Members | 1,492 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Add delegate to CollectionChanged

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
Nov 15 '05 #1
1 4607
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.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"Alessandro Rossi" <al**************@areaitsrl.com> wrote in message
news:17****************************@phx.gbl...
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

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Minh Khoa | last post by:
Please give me more information about delegate and its usage? Why do i use it and when?
4
by: ^MisterJingo^ | last post by:
Hi all, I've been trying to get my head around delegates. The book i'm using had a single example, not much explaination, and didn't show how to set up a delegate and pass variables in and out...
7
by: Ant | last post by:
Hello, Very simple question but one I need clarified. Which part of the statement below is considered the 'delegate'? Is it the 'new System.EventHandler' or the btnAccept_Click? or is it...
1
by: Quimbly | last post by:
I'm having some problems comparing delegates. In all sample projects I create, I can't get the problem to occur, but there is definitely a problem with my production code. I can't give all the...
11
by: matsi.inc | last post by:
I am looking to make something like a delegate that i can use in my projects but am having a hard time getting started. The behavior I am most interested in is how a delegate changes it's Invoke...
26
by: raylopez99 | last post by:
Here is a good example that shows generic delegate types. Read this through and you'll have an excellent understanding of how to use these types. You might say that the combination of the generic...
3
by: Joe | last post by:
Hello, I have a class that inherits from BaseCollection. I want to implement a Move method so an item in the collection can be moved from one index postion to another for example index = 5 to...
10
by: vcquestions | last post by:
Hi. Is there way to have a function pointer to a delegate in c++/cli that would allow me to pass delegates with the same signatures as parameters to a method? I'm working with managed code. ...
0
by: stexcec | last post by:
Hi All, I'm new with dataGridView control, and I would implement a form with such grid bounded to a custom collection (maybe a dictionary). Now , I can change the data in my dictionary, and then...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.