Custom Control with different control types...

F

forest demon

i'm trying to create a custom control that contains multiple controls
of different types(textbox, combox, checkbox, etc..)

the examples i see derive from one type....for instance TextBox.
ultimately, i need to bind to all the control types in my custom
control. i.e. populate the controls within the custom control, from a
database.

any input is appreciated....thanks.
 
M

Morten Wennevik [C# MVP]

Hi,

You can create a method on your UserControl that takes a BindingSource as parameter, have the UserControl bind its internal controls to this BindingSource. However, this assumes the UserControls knows what kind of properties the controls should be bound to.
 
F

forest demon

thanks for the input morten. i will play with that for a while.

cheers....
 

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