473,406 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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 1609
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Dales | last post by:
I have a custom control that builds what we refer to as "Formlets" around some content in a page. These are basically content "wrapper" sections that are tables that have a colored header and...
0
by: Joe | last post by:
I am having a hard time with setting a property on a custom server control that i am placing in a repeater. The control inherits from DropDownList. The property is being set in the repeater using...
10
by: Jon | last post by:
I'm investiging multi-threaded GUI applications; specifically the technique used to ensure that controls are only modified under the correct thread. The standard technique is to use ...
19
by: Jamey Shuemaker | last post by:
I'm in the process of expanding my knowledge and use of Class Modules. I've perused MSDN and this and other sites, and I'm pretty comfortable with my understanding of Class Modules with the...
4
by: | last post by:
I'm building some user controls. I very much like how you can build custom properties to be bound to a user control, and how instances of that control will show those custom properties in the...
2
by: rdemyan via AccessMonster.com | last post by:
My application has a lot of complicated SQL statements, calculations, processing that takes time. I've created a custom form to act like a messagebox. It has 10 small rectangles on it that change...
2
by: --== Alain ==-- | last post by:
Hi, I'm currently working under VC++.NET 2005 and i'm deriving my custom control from ListView. I need your feedback to know in which direction should i develop this control. I've seen on...
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.