Questions tagged [composite-controls]

In User Interface frameworks, a composite control is a control _composed_ of other existing child controls.

In User Interface frameworks, a composite control is a control composed of other existing child controls (a control being a UI element that the user can interact with such as a slider or a button).

The idea is create a custom control without having to develop the rendering of the control: it is delegated to the child controls. A composite control can itself be re-used as a child control of a higher composite control, thus making a hierarchy of controls.

.NET reference documentation about composite controls: http://msdn.microsoft.com/en-us/library/aa719968(v=vs.71).aspx

96 questions
1
vote
1 answer

Databinding controls inside CompositeControl

I have created a CompositeControl that is essentially a wrapper for a MultiView, but if I try to use any databound controls such as GridView or FormView inside the View, I get the error: Databinding methods such as Eval(), XPath(), and Bind() can…
RossJ
  • 555
  • 1
  • 4
  • 9
1
vote
0 answers

Why Child Control of CompositeControl not show design mode?

IDE: Visual Studio 2019 Framework: .net Framework 4.7.2 Hello everyone, for the work project, I made a CompositeControl, which will contain a TextBox, and a WebControl. My code as follows, and will explain my problem at the…
1
vote
1 answer

How to stop CompositeControl TabIndex property from setting tabindex on container span

I wrote a custom server control that inherits from CompositeControl. When the control is instantiated, I am dynamically adding a TextBox to its Controls collection. I have overridden the TabIndex property so that when it is set, it applies the…
jeremcc
  • 8,633
  • 11
  • 45
  • 55
1
vote
2 answers

Building a composite control with nested items

My goal is to create a composite control that looks like, acts like and behaves like a RadioButtonList. There is some extra things done behind the scenes which are working no problem. What I am unable to accomplish is the desired markup to use the…
Gavin Miller
  • 43,168
  • 21
  • 122
  • 188
1
vote
1 answer

ASP.NET composite control doesn't bubble event but template does

I am developing a composite control for an ASP.NET application and just by chance initially developed the control to use an ITemplate to create its child controls. There will be a series of buttons within the child controls that are to be handled…
SonOfPirate
  • 5,642
  • 3
  • 41
  • 97
1
vote
1 answer

MSDN example of Composite Control

I'm reading through some MSDN example code on Composite controls and finding that there is one thing I don't understand. Using the code here I've created the LabelTextBox control in my project and added it to a page. If I enter a new value into…
Hc5kphUXpR
  • 155
  • 1
  • 8
1
vote
0 answers

ScrolledComposite showing two scrollbars each for vertical & horizontal scroll

My current application is a RCP application using eclipse framework. There is a view whose composite is given to a Scrolled Composite and then all the relevant composites are made with the ScrolledComposite as the parent. protected void…
1
vote
0 answers

How to create a forwarding bindable property in a composite control

I wonder if it is actually possible to create a composite control that has common attributes with child controls and declare bindable forwarding properties without having all the boilerplate? By example I have this bindable property, MaxShownItems…
gfache
  • 606
  • 6
  • 15
1
vote
1 answer

Problems with ViewState of CompositeControl

I built a CompositeControl in ASP.Net and now I'm having trouble maintaining the ViewState of 3 instances of the Control on the hosting page. My CompositeControl has a property "HeaderText" and all 3 instances of my CompositeControl do have the…
Gerrit Horeis
  • 541
  • 5
  • 14
1
vote
1 answer

Adding jquery into a composite control

I am creating a composite control that has a textbox and uses a jquery plugin to add a watermark. Lets say I have a basic function that looks like this $(function () {$('#MyTextBoxID').watermark('Enter your username');}); Can anyone suggest what I…
Diver Dan
  • 9,953
  • 22
  • 95
  • 166
1
vote
1 answer

How can I assign a property value based on another property in a composite control?

Environment: Asp.net 4.5, Webforms I'm creating a composite control. I've exposed multiple public properties, but running into a slight problem. Let's say I have two properties: Public Property Path() As String Get Return…
user1447679
  • 3,076
  • 7
  • 32
  • 69
1
vote
1 answer

Adding a script with ScriptManager on a CompositeControl?

I'm trying to call my good old 'RegisterClientScriptBlock' on the friendly 'ScriptManager' class. It just doesn't work for my CompositeControl? I use it on a normal usercontrol (ascx) where it works. Visual Studio simply won't accept me typing…
Per Hornshøj-Schierbeck
  • 15,097
  • 21
  • 80
  • 101
1
vote
2 answers

Add ability to provide list items to composite control with DropDownLIst

I'm creating a composite control for a DropDownList (that also includes a Label). The idea being that I can use my control like a dropdown list, but also have it toss a Label onto the page in front of the DDL. I have this working perfectly for…
Kyle
  • 10,839
  • 17
  • 53
  • 63
1
vote
1 answer

Persisting a collection backed by viewstate in a CompositeControl

Maybe it's been a long day but I'm having trouble persisting a collection backed by the ASP.NET ViewState in a CompositeControl. Here's a simplified version: public class MyControl : CompositeControl { public Collection
tomfanning
  • 9,552
  • 4
  • 50
  • 78
1
vote
1 answer

Converting listview to a composite control

The link below shows a listview composite control in its most basic form however I can't seem to extend this to what I'm trying to do. How to define listview templates in code My listview has 1 tablerow with 2 fields. The first field contains 1…
Paul
  • 13
  • 5