Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
380
Dynamically creating WebDropDown
posted

How do I dynamically create a WebDropDown?

 

I have code like

WebDropDown dd = new WebDropDown();

containercontrol.Controls.Add(dd);

 

but whenever the container control is rendered I get a NullReferenceException.  Looking at the stack trace, the Renderer property on the WebDropDown control is null.  I'm assuming this has to be initialized somehow, how do I do that?

Parents
No Data
Reply
  • 380
    posted

    I could really use some help on this.  How do I create these controls dynamically?  There has to be a way.  I can create other infragistics web controls dynamically. 

    The problem seems to be that the Renderer property is null.  How do I set this?  I looked online at the documentation and it seems that this is a DropDownRenderer, but that object must be private or internal or something because I cannot create it.

Children
No Data