When a user clicks a button on my web page I want to create an instance of a Web User Control in my code behind, set the data source for a Rad Grid that is in the Web User Control, and then add the Web User Control to the controls collection on my page. When I try to set the datasource for the grid, I get a NullReferenceException. From what I can tell the grid is null. The scenario works when the user control already exists on the web page, but not when I create the web user control in code.
I have a sample project if that will help.
I have a sample project if that will help.