Custom Control with different control types...

  • Thread starter Thread starter forest demon
  • Start date Start date
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.
 
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.
 

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