473,396 Members | 2,055 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,396 software developers and data experts.

CompositeControl & CompositeDataBoundControl question

Hi

I want to create an n-tier custom server control.

The idea is that the control will determine [at run-time] which "view" will
be used. By this I mean User A may want the data displayed as a tree-view,
User B as a datagrid etc, etc.

So, I can envisage that in some circumstances it is using a data bound
control and in others a non-data bound control - who knows. In which case,
which do I inherit from - the CompositeControl or the
CompositeDataBoundControl?

Griff
Oct 11 '06 #1
1 2079
Hey Griff, both TreeView and DataGrid (GridView) are Data Bound
controls. Whenever you have a control that your binding to a
repeatable datasource (something that implements IEnumerable) go with
the CompositeDataBoundControl. It sounds like this is what you want.

Even if you were not binding to a repeatable data source (let's say you
were binding to a Detail view of a record that was shown in list) the
CompositeDataBoundControl can help you out because it has a DataSource
and other properties/methods. THis is something the CompositeControl
doesn't have. This will help your end user have a consistent API with
data related controls.

If there's Data Involved, go with CompositeDataBoundControl. It has
the necessary support for working with a datasource, whether it's
repeatable or not.

Michael Hamrah

Griff wrote:
Hi

I want to create an n-tier custom server control.

The idea is that the control will determine [at run-time] which "view" will
be used. By this I mean User A may want the data displayed as a tree-view,
User B as a datagrid etc, etc.

So, I can envisage that in some circumstances it is using a data bound
control and in others a non-data bound control - who knows. In which case,
which do I inherit from - the CompositeControl or the
CompositeDataBoundControl?

Griff
Oct 12 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mantorok | last post by:
Hi all I finally got around to creating some WebControl classes, however I want to add some validation to my custom control, it's a descendant of CompositeControl. I get the exception: Unable...
0
by: Umut Tezduyar | last post by:
I have a control derived from ComposeteDataBoundControl. Control doesn't retreive it's state information. I am going to frick out! What should I do more? I added two codes. One is for Default.aspx...
2
by: Umut Tezduyar | last post by:
I have a control derived from ComposeteDataBoundControl. Control doesn't retreive it's state information. I am going to frick out! What should I do more? I added two codes. One is for Default.aspx...
1
by: Andrew Clancy | last post by:
Hi, Myself and a colleague are attempting to mimic the custom template functionality of the ASP.Net 2 Login control. Essentially, we would like to have the ability within our...
2
by: Electric Co. | last post by:
Hello, I have two questions: 1.) How successfully does ASP.NET 2005 handle custom composite controls nested inside of custom composite controls? For example:
2
by: Rolf Welskes | last post by:
Hello, When developing Customcontrols which have other controls it seems be good practice to inherent from CompositeControl. But other as at WebControl I am not able to set the tag of the...
0
by: Steve Richter | last post by:
my composite control does not render correctly the 2nd time it is made visible. When I change the base class from CompositeControl to WebControl, the control works as it should. public class...
2
by: Nathan Sokalski | last post by:
I am write a CompositeControl, and one of the controls being included is a Repeater. This is my first time including a templated control in a control other than a UserControl. I am not sure how to...
6
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi... Tried posting this on Build Controls but then saw that's a pretty slow group... Kind of a typical request from product management - they want to be able to swap in different 3rd party...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.