Hi All,
I am trying to build one server control which has one panel and within
this panel there will be two more panel. I have created two instance of
MyPanel class (inherited by Panel), it works fine in design as well as
runtime. The problem is I want user to be able to add controls on
designtime to the inner panel. Can any body tell me how to achieve
this? I tried inheriting MyPanel class with IContainer, still its not
working. When I inherit the main control with Panel, I am able to add
controls in design time while same I am doing for Inner Panel, its not
working. Also I have tried adding InnerPanel (MyPanel) in Render, Init
method, Constructor of controls, but neither way it worked. Can any
body suggest where I am doing wrong.
wishing you all in anticipation,
warm regards,
- hungrymind
Gary Vidal - 26 Jul 2006 01:49 GMT
Use ITemplate and in the CreateChildControls
///Property
public ITemplate PanelTemplate
{
get{return m_PanelTemplate;}
set{m_PanelTemplate = value;}
}
///createchildcotnrols
m_PanelTemplate.InstantiateIn(panelToInstantiate);
//add any additional controls to the template
Gary Vidal
> Hi All,
>
[quoted text clipped - 14 lines]
> warm regards,
> - hungrymind