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

RenderControl Error

1 Answer 73 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Najid Hanif
Top achievements
Rank 2
Najid Hanif asked on 26 Feb 2013, 04:47 AM
I get the following error when trying to RenderControl to html

Script control 'ExecutiveSummaryReport_RadGrid1' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().
Parameter name: scriptControl

protected void ExecutiveSummary_EmailReport(object sender, EventArgs e)
{
    StringBuilder sb = new StringBuilder();
    StringWriter sw = new StringWriter(sb);
    HtmlTextWriter htw = new HtmlTextWriter(sw);
    ExecutiveSummaryReport_RadGrid1.RenderControl(htw);//Error happens here
}

What am I doing wrong?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 26 Feb 2013, 06:45 AM
Hi,

Please try setting the RegisterWithScriptManager Property of RadGrid to False as shown below.

ASPX:
<telerik:RadGrid ID="Radgrid1" runat="server" DataSourceID="SqlDataSource1" AutoGenerateColumns="false"
    OnItemCommand="Radgrid1_ItemCommand" RegisterWithScriptManager="false">

Thanks,
Princy.
Tags
Grid
Asked by
Najid Hanif
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Share this question
or