Hi,
I want to create a custom control. This control will be derived from any rad controls. And i want to create a new control in overrided render method. When i try in the following example I'm getting this error: "Script control 'blabla' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().
Parameter name: scriptControl"
Do you have any idea or any example?
Example:
//Using my custom control in aspx file
....//any codes
<mcc:MyCustomControl ID="mcc1" runat="server" />
....//any codes
//My Custom Control Class
public class MycustomControl : RadTextBox
{
....//any codes
protected override void Render(HtmlTextWriter writer)
{
RadGrid customControlGrid = new RadGrid();
customControlGrid.ID = "blabla";
customControlGrid.Page = this.Page;
customControlGrid.......
customControlGrid.RenderControl(writer);
base.Render(writer);
}
....//any codes
}
I want to create a custom control. This control will be derived from any rad controls. And i want to create a new control in overrided render method. When i try in the following example I'm getting this error: "Script control 'blabla' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().
Parameter name: scriptControl"
Do you have any idea or any example?
Example:
//Using my custom control in aspx file
....//any codes
<mcc:MyCustomControl ID="mcc1" runat="server" />
....//any codes
//My Custom Control Class
public class MycustomControl : RadTextBox
{
....//any codes
protected override void Render(HtmlTextWriter writer)
{
RadGrid customControlGrid = new RadGrid();
customControlGrid.ID = "blabla";
customControlGrid.Page = this.Page;
customControlGrid.......
customControlGrid.RenderControl(writer);
base.Render(writer);
}
....//any codes
}