Custom asp.net control using collection - Design Time Refresh

Discussion in 'ASP .Net Building Controls' started by Patrick, Oct 7, 2005.

  1. Patrick

    Patrick Guest

    I have a custom asp.net control that uses a collection class to store items.
    Properties modified for each item cause the design time window to refresh, I
    am using the "ParentNotify" attribute, this works well. I also am using a
    composite control designer class that renders the control very well.

    My only complaint/question is: how can I refresh the design time surface
    when items are added to the collection? The only way to refresh the design
    time seems to be changing a property or by recompiling.
     
    Patrick, Oct 7, 2005
    #1
    1. Advertising

  2. Hi Jeff,

    Check out the Free Ultra Menu at http://OTBTechSystems.Com ,you can download
    it from the Features page. The control uses a custom built Editor to update
    it's collection. In the code for the Editor you can see where it marks the
    collection as dirty and forces VS.Net to update it's design-time view while
    you are still in the editor. The code is 100% VB.Net. Good luck! Ken.

    --
    Ken Dopierala Jr.
    For great ASP.Net web hosting try:
    http://www.webhost4life.com/default.asp?refid=Spinlight
    If you sign up under me and need help, email me.


    "Patrick" <> wrote in message
    news:...
    > I have a custom asp.net control that uses a collection class to store

    items.
    > Properties modified for each item cause the design time window to refresh,

    I
    > am using the "ParentNotify" attribute, this works well. I also am using a
    > composite control designer class that renders the control very well.
    >
    > My only complaint/question is: how can I refresh the design time surface
    > when items are added to the collection? The only way to refresh the

    design
    > time seems to be changing a property or by recompiling.
     
    Ken Dopierala Jr., Oct 10, 2005
    #2
    1. Advertising

  3. Oops...I mean "Hi Patrick". That's what I get for copy & paste! ;-}

    "Ken Dopierala Jr." <> wrote in message
    news:%...
    > Hi Jeff,
    >
    > Check out the Free Ultra Menu at http://OTBTechSystems.Com ,you can

    download
    > it from the Features page. The control uses a custom built Editor to

    update
    > it's collection. In the code for the Editor you can see where it marks

    the
    > collection as dirty and forces VS.Net to update it's design-time view

    while
    > you are still in the editor. The code is 100% VB.Net. Good luck! Ken.
    >
    > --
    > Ken Dopierala Jr.
    > For great ASP.Net web hosting try:
    > http://www.webhost4life.com/default.asp?refid=Spinlight
    > If you sign up under me and need help, email me.
    >
    >
    > "Patrick" <> wrote in message
    > news:...
    > > I have a custom asp.net control that uses a collection class to store

    > items.
    > > Properties modified for each item cause the design time window to

    refresh,
    > I
    > > am using the "ParentNotify" attribute, this works well. I also am using

    a
    > > composite control designer class that renders the control very well.
    > >
    > > My only complaint/question is: how can I refresh the design time surface
    > > when items are added to the collection? The only way to refresh the

    > design
    > > time seems to be changing a property or by recompiling.

    >
    >
     
    Ken Dopierala Jr., Oct 10, 2005
    #3
  4. Patrick

    Patrick Guest

    Thanks, I checked out that project and I see how it works. However our
    control exposes a read only property for the collection.

    Is there any other way to notify the design time of changes to the
    collection? I also noticed that when collection items are removed they are
    not removed from the code behind on the page. I am sure this has something
    to do with the notification failing. This causes problems when you
    add/remove/ and add collection items again because it orphans declarations
    for each item you remove.

    Maybe I need to find a way to remove the "readonly" from the property.
    Seems like we had some trouble with the collection and viewstate unless it
    was read only.


    "Ken Dopierala Jr." wrote:

    > Oops...I mean "Hi Patrick". That's what I get for copy & paste! ;-}
    >
    > "Ken Dopierala Jr." <> wrote in message
    > news:%...
    > > Hi Jeff,
    > >
    > > Check out the Free Ultra Menu at http://OTBTechSystems.Com ,you can

    > download
    > > it from the Features page. The control uses a custom built Editor to

    > update
    > > it's collection. In the code for the Editor you can see where it marks

    > the
    > > collection as dirty and forces VS.Net to update it's design-time view

    > while
    > > you are still in the editor. The code is 100% VB.Net. Good luck! Ken.
    > >
    > > --
    > > Ken Dopierala Jr.
    > > For great ASP.Net web hosting try:
    > > http://www.webhost4life.com/default.asp?refid=Spinlight
    > > If you sign up under me and need help, email me.
    > >
    > >
    > > "Patrick" <> wrote in message
    > > news:...
    > > > I have a custom asp.net control that uses a collection class to store

    > > items.
    > > > Properties modified for each item cause the design time window to

    > refresh,
    > > I
    > > > am using the "ParentNotify" attribute, this works well. I also am using

    > a
    > > > composite control designer class that renders the control very well.
    > > >
    > > > My only complaint/question is: how can I refresh the design time surface
    > > > when items are added to the collection? The only way to refresh the

    > > design
    > > > time seems to be changing a property or by recompiling.

    > >
    > >

    >
    >
    >
     
    Patrick, Oct 13, 2005
    #4
    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:
    736
  2. Øyvind Isaksen
    Replies:
    1
    Views:
    1,011
    Øyvind Isaksen
    May 18, 2007
  3. Replies:
    1
    Views:
    400
    Teemu Keiski
    Jul 2, 2003
  4. David Keenan

    Custom collection design time support

    David Keenan, Oct 9, 2003, in forum: ASP .Net Building Controls
    Replies:
    2
    Views:
    169
    David Keenan
    Oct 13, 2003
  5. Replies:
    1
    Views:
    354
    justncase80
    Sep 27, 2005
Loading...

Share This Page