Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Building Controls (http://www.velocityreviews.com/forums/f59-asp-net-building-controls.html)
-   -   Custom asp.net control using collection - Design Time Refresh (http://www.velocityreviews.com/forums/t757971-custom-asp-net-control-using-collection-design-time-refresh.html)

Patrick 10-07-2005 12:45 PM

Custom asp.net control using collection - Design Time Refresh
 
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. 10-10-2005 06:54 PM

Re: Custom asp.net control using collection - Design Time Refresh
 
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" <Patrick@discussions.microsoft.com> wrote in message
news:E54F3499-0CFE-463B-B026-74C1BEAF3C04@microsoft.com...
> 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. 10-10-2005 07:04 PM

Re: Custom asp.net control using collection - Design Time Refresh
 
Oops...I mean "Hi Patrick". That's what I get for copy & paste! ;-}

"Ken Dopierala Jr." <kdopierala2@wi.rr.com> wrote in message
news:%23QmH5tczFHA.2884@TK2MSFTNGP09.phx.gbl...
> 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" <Patrick@discussions.microsoft.com> wrote in message
> news:E54F3499-0CFE-463B-B026-74C1BEAF3C04@microsoft.com...
> > 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 10-13-2005 12:21 PM

Re: Custom asp.net control using collection - Design Time Refresh
 
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." <kdopierala2@wi.rr.com> wrote in message
> news:%23QmH5tczFHA.2884@TK2MSFTNGP09.phx.gbl...
> > 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" <Patrick@discussions.microsoft.com> wrote in message
> > news:E54F3499-0CFE-463B-B026-74C1BEAF3C04@microsoft.com...
> > > 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.

> >
> >

>
>
>



All times are GMT. The time now is 08:49 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.