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?
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.