Databinding on Custom Control with ITemplate?

I Solved my problem with a custom TemplateContainer inherit from IDataItemContainer : public class BlocArrondiContainer : Panel, IDataItemContainer Change : protected Panel _PanelContenuPrincipal = new Panel(); PersistenceMode(PersistenceMode. InnerProperty) TemplateInstance(TemplateInstance. Single) public ITemplate ContenuPrincipal { get { return _ContenuPrincipal; } set { _ContenuPrincipal = value; } } By : protected BlocArrondiContainer _PanelContenuPrincipal = new BlocArrondiContainer (); PersistenceMode(PersistenceMode.

InnerProperty) TemplateInstance(TemplateInstance. Single) TemplateContainer(typeof(BlocArrondiContainer)) public ITemplate ContenuPrincipal { get { return _ContenuPrincipal; } set { _ContenuPrincipal = value; } } Overrinding the OnDataBinding method on the BlocArrondi class : protected override void OnDataBinding(System. EventArgs e) { if (NamingContainer is IDataItemContainer) _PanelContenuPrincipal.

DataItem = (NamingContainer as IDataItemContainer). DataItem; base. OnDataBinding(e); }.

Great solution to your problem. I was coming to almost the same. – Johan Buret Dec 2 '10 at 15:01.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions