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
0
votes
1 answer

C# Composite Control will lose name at design and run time

I developed a composite control using C# Windows Forms Control Library and code as follow: public partial class MyControl : UserControl { public event EventHandler NameChanged; protected virtual void OnNameChanged() { …
TwenteMaster
  • 148
  • 2
  • 12
0
votes
3 answers

How to detect C# control name changed?

I created a composite control using C# Windows Forms Control Library, when I use the new control in a test program, I want to find a way to detect when did the name of new control changed at design time, what should I do?
TwenteMaster
  • 148
  • 2
  • 12
0
votes
0 answers

Correct Pattern for creating Server Controls?

I am creating a server control (inheriting from CompositeControl). The control comprises of several data bound drop down lists (and some textboxes etc). The drop down lists form a hierarchy, so are dependent on each other...…
Craig
  • 849
  • 8
  • 21
0
votes
2 answers

Correct order of overrides for a composite control based on an abstract one

I'm writing a set of C# composite web server controls for displaying dialog boxes. I want to have one abstract class which handles the basic layout and things like titles of the control, then have a set of derived ones which render child controls at…
mattdwen
  • 5,288
  • 10
  • 47
  • 61
0
votes
1 answer

composite control renders after i need to use one of the properties (control lifecycle)

I have created a composite control for a file upload input (using an HtmlInputFile control). My problema is that everything works fine until I try to save the file using HtmlInputFile's "SaveAs" in my page's code behind. Whenever I press the button…
aplon
  • 445
  • 6
  • 24
0
votes
1 answer

Composite control property that allows coder to select from options

The question is in the title but to make it clearer when you use a normal server control like the properties of textbox allow you to select…
insanepaul
  • 187
  • 2
  • 5
  • 17
0
votes
1 answer

Text-property of my ASP.NET Composite-control doesn't set text-changes

I have build a composite control which renders a TextControl or a RADEditor control, dependable of a property a set. Both rendered controls have a Text-property. The problem is that when I change the Textvalue on my webpage (when it is running) it…
Patrick
  • 1
  • 1
0
votes
1 answer

DropDownList within composite control is losing selected value on postback

I am building a composite server control that currently only has a TextBox and a DropDownList. Here is the code in all its foetal glory: public Address : CompositeControl { private string[] _states = new string[] { string.Empty,…
Quick Joe Smith
  • 8,074
  • 3
  • 29
  • 33
0
votes
1 answer

Update panel inside Server Control

I'm trying to update panel content by using __DePostBack call to the server, the HTTP server side is fired but the panel won't updates, The update panel is in custom server control and it unfamiliar to the PAGE context and I can reach it only by…
0
votes
1 answer

Prevent clearing of child controls in composite control

I have a custom server control that the markup looks like such:
mrK
  • 2,208
  • 4
  • 32
  • 46
0
votes
1 answer

Getting data back from composite control added to placeholder on postback

I'm trying to create a factory pattern based on the CompositeControl class. Everything is working fine. Except as I understand it I have to add the control back onto the placeholder control on my actual page. I've searched around for examples and…
0
votes
1 answer

Applying a theme in a composite control

I have a composite control that creates a datagrid and other components. The control has the Themeable attribute set to true: [ToolboxData("<{0}:MyCompositeControl runat=server />")] [Themeable(true)] public class MyCompositeControl :…
Paolo Tedesco
  • 55,237
  • 33
  • 144
  • 193
0
votes
2 answers

Setting TabIndex on TextBox within ASP.NET Dynamically Generated Controls?

I have a CompositeControl that each contain a TextBox (TextBoxA) and three Buttons (ButtonA, ButtonB, and ButtonC). My page generates n of these CompositeControls dynamically depending on the state of the page. I've set the TabIndex of TextBoxA to a…
Nick Orlando
  • 484
  • 1
  • 5
  • 17
0
votes
1 answer

Create 'Style' property on CompositeControl in ASP.Net

I'm having a problem creating a new CompositeControl. Currently I have a custom control that inherits from TextBox, the control DOES NOT have the Style property defined, but I can set the property in the page Markup and the style will be applied…
willvv
  • 8,439
  • 16
  • 66
  • 101
0
votes
1 answer

Recreate child controls and ViewState

Lets explain the problem with a simple case: Lets CC be a composite control. CC has a variable called filter (string) stored in viewState. CC has 2 static child controls: searchBox: Textbox searchButton: Button The user type a search term and…
fso
  • 144
  • 2
  • 14