all groups > c# > june 2007 >
You're in the

c#

group:

Custom Control with different control types...



Custom Control with different control types... forest demon
6/30/2007 11:30:19 PM
c#: 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.
Re: Custom Control with different control types... Morten Wennevik [C# MVP]
7/1/2007 12:00:00 AM
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.

[quoted text, click to view]



--
Happy coding!
Re: Custom Control with different control types... forest demon
7/1/2007 8:41:09 PM
thanks for the input morten. i will play with that for a while.

cheers....

[quoted text, click to view]

AddThis Social Bookmark Button