Item Collection Editor doesn't preserve collection

  • Thread starter Thread starter Andrés Giraldo
  • Start date Start date
A

Andrés Giraldo

Hi!

I'm trying to create a control that has an item collection property.
Inheriting from a WebControl, my CustomControl Inherits it's base editor
too. It's editor allows to fill the item collection property in design
time, that's ok...

But when I create the items collection and I look into the HTML view at
design time, the Items property is setted to the type of the item
collection property...

<cc1:CustomControl Items="ItemCollection"></cc1:CustomControl>

If I run the form, it doesn't show me any Item of the Collection I've
created before...

Anyone could give me an idea of what's happenning? I'm completely
lost!!!

I don't have any idea of preserving the items collection property at
design time!!!

Thanks a lot!
 
Hi,

how have you implemented the property? Is it read-only and does it have
required attributes applied? Like
PersistenceMode(PersistenceMode.InnerProperty), NotifyParentProperty(true)
and DesignerSerializationVisibility(DesignerSerializationVisibility.Content)
?

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist

Hi!

I'm trying to create a control that has an item collection property.
Inheriting from a WebControl, my CustomControl Inherits it's base editor
too. It's editor allows to fill the item collection property in design
time, that's ok...

But when I create the items collection and I look into the HTML view at
design time, the Items property is setted to the type of the item
collection property...

<cc1:CustomControl Items="ItemCollection"></cc1:CustomControl>

If I run the form, it doesn't show me any Item of the Collection I've
created before...

Anyone could give me an idea of what's happenning? I'm completely
lost!!!

I don't have any idea of preserving the items collection property at
design time!!!

Thanks a lot!
 
Hi!

The declaration for the Item Collection Property is defined like this:

Public ReadOnly Property Items() As TabItemCollection

Thanks for answer!
 
Back
Top