Problems MVP Advice Requested post.
.. At the web site you can download source code that will probably get you
further along with your problem.
"Teemu Keiski" <joteke@aspalliance.com> wrote in message
news:%23M5ZdZ0QEHA.3220@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> additionally specify the proeprty with NotifyParentProperty(true)
attribute.
> Does that help at all?
>
> --
> Teemu Keiski
> MCP, Microsoft MVP (ASP.NET), AspInsiders member
> ASP.NET Forum Moderator, AspAlliance Columnist
>
http://blogs.aspadvice.com/joteke >
>
>
> "Alexander Popov" <Alexander@quantum.ru> wrote in message
> news:OubnggvQEHA.3300@TK2MSFTNGP09.phx.gbl...
> > i have following sample Control
> >
> > [ParseChildren(true)]
> > [PersistChildren(true)]
> > public class MyControl: System.Web.UI.Control
> > {
> > MyCollection values_ = new MyCollection ();
> >
> > [PersistenceMode(PersistenceMode.InnerProperty),
> >
> >
DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
> > public MyCollection Values
> > {
> > get
> > {
> > return values_;
> > }
> > }
> > protected override void OnInit(EventArgs e)
> > {
> > base.OnInit (e);
> > //...
> > }
> >
> > protected override void Render(HtmlTextWriter writer)
> > {
> > base.Render (writer);
> > //...
> > }
> > }
> >
> > //Collection:
> > public class MyCollection : CollectionBase
> > {
> > public MyItem this[int index]
> > {
> > get
> > {
> > return this.InnerList[index] as MyItem ;
> > }
> > }
> >
> > public MyItem Add(MyItem item)
> > {
> > this.InnerList.Add(item);
> > return item;
> > }
> > }
> > //Item - its NOT control, same as Columns in Datagrid
> > public class MyItem
> > {
> > protected string prop_;
> > public string Prop
> > {
> > get{return prop_;}
> > set{prop_ = value;}
> > }
> > }
> >
> >
> >
> > it's work Perfect if I fill control by Hand in ASPX :
> >
> > <cc1:MyControl id=MyControl1 runat="server" >
> > <Values>
> > <cc1:MyItem Prop="value1"/>
> > <cc1:MyItem Prop="value2"/>
> > <cc1:MyItem Prop="value3"/>
> > </Values>
> > </cc1:MyControl>Now I want to have ability fill control with same
> structure
> > in designer.When I click "..." button in property grid on Values row -
> > Collection Editor is Open and I may do add|remove my Items.But when I
> click
> > "OK", in ASPX control stay empty<cc1:MyControl id=MyControl1
> > runat="server" >
> > </cc1:MyControl>Much more, if control have existing items in aspx view,
> it's
> > deleted.Whats wrong?
> >
> >
>
>