Creating a Control that loads its data at runtime based on connection string property

SteveL

Member
Joined
Mar 14, 2006
Messages
6
Programming Experience
3-5
Hi,
I have created a custom control for editing a standard address.
This control contains combo boxes for County, Country etc

The control contains a property that is used at design time to specify a connection string. My intension is to populate the controls at runtime

What is the best approach to utilise this property? What event should i use to load the data?

Thanks for any help
 
So am i right in saying that you want to be able to populate the control and be able to change the connection string property at runtime then load the appropriate information based on the connection? am i on the right track here.
 
I want to be able to point the control to a different sql server datasource at design time only.

Running the application that contains the control will populate the combo boxes within the control based on the connection string provided.

I intend to populate a dataset 'housed' within the control, this will provide the data for my combo boxes.

Thanks
 
I want to set the property via the property grid without using any code.
Any ideas? I can add the property attribute to the control but im unsure how to reference it.
Thanks
 
Back
Top