Design time rendering of a composite custom web control

Discussion in 'ASP .Net' started by Barry Carr, Jan 14, 2004.

  1. Barry Carr

    Barry Carr Guest

    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
    Barry Carr, Jan 14, 2004
    #1
    1. Advertising

  2. Barry Carr

    Natty Gur Guest

    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!
    Natty Gur, Jan 14, 2004
    #2
    1. Advertising

  3. Barry Carr

    Barry Carr Guest

    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 <> 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!
    Barry Carr, Jan 14, 2004
    #3
  4. Barry Carr

    Natty Gur Guest

    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!
    Natty Gur, Jan 15, 2004
    #4
  5. Barry Carr

    Barry Carr Guest

    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
    Barry Carr, Jan 15, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    709
  2. Replies:
    1
    Views:
    360
    Teemu Keiski
    Jul 2, 2003
  3. Sam Fields

    Rendering DataGrid in a custom control at design time

    Sam Fields, Jan 15, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    142
    Sam Fields
    Jan 15, 2004
  4. Joey Lee

    Rendering Custom Control during design time

    Joey Lee, Jun 30, 2005, in forum: ASP .Net Building Controls
    Replies:
    2
    Views:
    147
    Joey Lee
    Jul 1, 2005
  5. Sam Fields

    Rendering DataGrid in a custom control at design time

    Sam Fields, Jan 15, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    133
    Sam Fields
    Jan 15, 2004
Loading...

Share This Page