This is a migrated thread and some comments may be shown as answers.

To find my problem in a RadGrid WebUserControl in a dll

1 Answer 45 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Maxime Bellemare
Top achievements
Rank 2
Maxime Bellemare asked on 07 Jan 2012, 05:59 PM
Here is my situation.

I create a dll file that includes the name WebUserControl "EditRecord" and inside the WebUserControl, there is a RadGrid.

EditRecord is the Embed Resource DLL. At the exit I have this: ExampleCustomModule.dll.
Dll file is saved in the database. When necessary, I made ​​the following code:

Dim assembly As System.Reflection.Assembly = System.Reflection.Assembly.Load(data)
Dim controlType As System.Type = assembly.GetType("ExampleCustomModule.EditRecord")
Dim myControl As Control = DirectCast(Activator.CreateInstance(controlType), Control)

When I check: myControl.Controls.Count it m'inidique I 0 control.

I'm putting as much control, there is nothing. I also try with: LoadControl (controlType, Nothing) but no success.

Have you any idea how I should do to recreate my control but also contains the controls inside?

Is my approach to backup my dll in the database is wrong or should I save in my bin?

1 Answer, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 10 Jan 2012, 10:47 AM
Hello Claude,

Could you please try using the composite control instead of WeUserControl and let me know if the issue still persist. On the following links you could find information about how to build composite Controls:
http://msdn.microsoft.com/en-us/library/aa479016.aspx
http://www.codersource.net/asp-net/asp-net-advanced/creating-a-composite-control-in-asp-net.aspx
http://weblogs.asp.net/scottgu/archive/2006/01/29/436854.aspx

Looking forward for your reply

All the best,
Radoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Grid
Asked by
Maxime Bellemare
Top achievements
Rank 2
Answers by
Radoslav
Telerik team
Share this question
or