Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Custom asp.net control using collection - Design Time Refresh

Reply
Thread Tools

Custom asp.net control using collection - Design Time Refresh

 
 
Patrick
Guest
Posts: n/a
 
      10-07-2005
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.
 
Reply With Quote
 
 
 
 
Ken Dopierala Jr.
Guest
Posts: n/a
 
      10-10-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.



 
Reply With Quote
 
 
 
 
Ken Dopierala Jr.
Guest
Posts: n/a
 
      10-10-2005
Oops...I mean "Hi Patrick". That's what I get for copy & paste! ;-}

"Ken Dopierala Jr." <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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.

>
>



 
Reply With Quote
 
Patrick
Guest
Posts: n/a
 
      10-13-2005
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." <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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.

> >
> >

>
>
>

 
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
Collection problems (create Collection object, add data to collection, bind collection to datagrid) Řyvind Isaksen ASP .Net 1 05-18-2007 09:24 AM
custom control (with collection) do not render at Design time rleblond@jeancoutu.com ASP .Net Building Controls 1 09-27-2005 01:15 PM
Custom collection design time support David Keenan ASP .Net Building Controls 2 10-13-2003 02:49 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