Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Databinding with a user control

Status
Not open for further replies.

StevoSimpson

Programmer
Apr 23, 2006
6
GB
Hi,

I am attempting to create a user control which consists of 3 textboxes, one for minimum, most likely, and maximum values. The controls Value property is databound to a bindingSource which represents a business object. The actual control is bound to a Distribution class which exposes the 3 seperate values.

On setting the Value property, the textboxes are updated with the correct value, and this seems to work fine.

In the application I have a treeview which shows a list of business objects. The bindingSources are setup so that on changing the selected node the values in all the databound controls update to the correct values from the list. This works fine for the windows controls, but not for the user control I created. I assume I am missing something (attribute somewhere or interface perhaps?) that is preventing this from happening?

Basically I want the value in the user control to update when the bindingSource Current property changes. Any ideas as to how I go about this are much appreciated.

Cheers,

Steven
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top