Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Design time rendering of a composite custom web control

Reply
Thread Tools

Design time rendering of a composite custom web control

 
 
Barry Carr
Guest
Posts: n/a
 
      01-14-2004
Hi,

I've created a composite custom web control and a ControlDesigner
descendant to render the control a design time.

The child controls are public properties of composite control and as such
the child controls appear in the property inspector as sub-properties of
the main control and can be manipulated as normal at design time. If any of
the properties of the parent (main) control are changed at design time the
composite control is updated (re-rendered) in the designer to reflect the
change. However, if any of the properties of the child controls are changed
in the property inspector the control is not updated in the designer.

So my qestion is this: is there a way to get the whole control to be re-
rendered at designtime if any of the properties of the child controls are
updated? I've tried the NotifyParent Attribute on the child control
properties but this doesn't appear to work. Any help would be appreciated.

Thanks

Regards

Barry Carr
 
Reply With Quote
 
 
 
 
Natty Gur
Guest
Posts: n/a
 
      01-14-2004
I'm using this trick from control designers :

I create public Refresh method for the control :

public void Refresh()
{
EventArgs e = new EventArgs();
this.OnPreRender(e);
}

every time i call that public method the control render itself.

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Barry Carr
Guest
Posts: n/a
 
      01-14-2004
Hi Natty,

Thanks for this. Am I right in thinking that this is a runtime solution?
If it is then it doesn't quite meet my needs, my problems are at design
time.

Regards

Barry Carr

Natty Gur <(E-Mail Removed)> wrote in news:#j8#Pfm2DHA.484
@TK2MSFTNGP10.phx.gbl:

> I'm using this trick from control designers :
>
> I create public Refresh method for the control :
>
> public void Refresh()
> {
> EventArgs e = new EventArgs();
> this.OnPreRender(e);
> }
>
> every time i call that public method the control render itself.
>
> Natty Gur[MVP]
>
> blog : http://weblogs.asp.net/ngur
> Mobile: +972-(0)58-888377
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!


 
Reply With Quote
 
Natty Gur
Guest
Posts: n/a
 
      01-15-2004
Hi,

As i said i use this function from control designers that let programmer
to design controls at design time.

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
Barry Carr
Guest
Posts: n/a
 
      01-15-2004
Hi Natty,

I see where you are coming from now. However I'm not using a custom control
designer (I'm assuming that you mean some sort of custom dialog created to
manipulate a component at design time).

Since I posted my original message I've more or less resigned myself to
surfacing the properties I need on the child controls as properties of the
main control. I noticed that although a child control appeared in the
poroperty inspector as expected its events did not appear; which, is pretty
much useless so I'll have to "manually" surface the properties and events
that I need.

Thanks for your help.

Cheers

Barry Carr
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rendering Custom Control during design time Joey Lee ASP .Net Building Controls 2 07-01-2005 03:35 AM
Possible to create a composite control that has a child control that is a validator that validates the composite control itself? Jonathan Eric Miller ASP .Net Building Controls 2 07-22-2004 10:58 PM
Rendering DataGrid in a custom control at design time Sam Fields ASP .Net Building Controls 0 01-15-2004 07:41 PM
Using Table control in a custom composite control. Control does not render properly in design time. jb_in_marietta@yahoo.com ASP .Net Building Controls 1 07-02-2003 08:05 AM
Using Table control in a custom composite control. Control does not render properly in design time. jb_in_marietta@yahoo.com ASP .Net 0 07-01-2003 09:26 PM



Advertisments