468,107 Members | 1,267 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,107 developers. It's quick & easy.

Custom Control with different control types...

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.

Jul 1 '07 #1
2 1478
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.

On Sun, 01 Jul 2007 08:30:19 +0200, forest demon <me********@gmail.comwrote:
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.



--
Happy coding!
Morten Wennevik [C# MVP]
Jul 1 '07 #2
thanks for the input morten. i will play with that for a while.

cheers....
>On Jul 1, 1:21 am, "Morten Wennevik [C# MVP]" <MortenWenne...@hotmail.comwrote:
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.

On Sun, 01 Jul 2007 08:30:19 +0200, forest demon <mete.ha...@gmail.comwrote:
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.

--
Happy coding!
Morten Wennevik [C# MVP]

Jul 2 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Joe | last post: by
19 posts views Thread by Jamey Shuemaker | last post: by
2 posts views Thread by rdemyan via AccessMonster.com | last post: by
2 posts views Thread by --== Alain ==-- | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.