All,
I have a pretty simple grid setup (see grid code below). When I try to export to PDF I get the exception below. I can't register the controls because I only have reference to them during "ItemDataBound" event.
What's the work around on this one?
Script control
'lblDealer'
is
not a registered script control. Script controls must be registered
using
RegisterScriptControl() before calling RegisterScriptDescriptors().
Parameter name: scriptControl
Here is my RadGrid Markup
01.
<
telerik:RadGrid
runat
=
"server"
ID
=
"gvDealerTunes"
RenderMode
=
"Lightweight"
AllowPaging
=
"False"
AllowSorting
=
"True"
AllowFilteringByColumn
=
"False"
>
02.
<
ExportSettings
IgnorePaging
=
"True"
OpenInNewWindow
=
"True"
>
03.
<
Pdf
PageHeight
=
"210mm"
PageWidth
=
"297mm"
DefaultFontFamily
=
"Arial Unicode MS"
PageTopMargin
=
"45mm"
04.
BorderStyle
=
"Medium"
BorderColor
=
"#666666"
/>
05.
</
ExportSettings
>
06.
<
MasterTableView
AutoGenerateColumns
=
"False"
>
07.
<
Columns
>
08.
<
telerik:GridBoundColumn
HeaderText
=
"Tune Order Id"
DataField
=
"TuneOrderId"
/>
09.
<
telerik:GridTemplateColumn
HeaderText
=
"Dealer"
>
10.
<
ItemTemplate
>
11.
<
telerik:RadLabel
runat
=
"server"
ID
=
"lblDealer"
/>
12.
</
ItemTemplate
>
13.
</
telerik:GridTemplateColumn
>
14.
<
telerik:GridTemplateColumn
HeaderText
=
"Customer"
>
15.
<
ItemTemplate
>
16.
<
telerik:RadLabel
runat
=
"server"
ID
=
"lblCustomer"
/>
17.
</
ItemTemplate
>
18.
</
telerik:GridTemplateColumn
>
19.
<
telerik:GridBoundColumn
HeaderText
=
"Zen Ticket #"
DataField
=
"ZenDeskTicketNumber"
/>
20.
<
telerik:GridBoundColumn
HeaderText
=
"Vendor Order #"
DataField
=
"VendorOrderNumber"
/>
21.
<
telerik:GridBoundColumn
DataField
=
"OrderedVerified"
HeaderText
=
"Verified"
/>
22.
<
telerik:GridBoundColumn
DataField
=
"OrderVerfificationSource"
HeaderText
=
"Verification"
/>
23.
<
telerik:GridBoundColumn
DataField
=
"IsTuneUpdate"
HeaderText
=
"Tune Update?"
/>
24.
<
telerik:GridBoundColumn
DataField
=
"TuneCanBeAutoGenerated"
HeaderText
=
"AG?"
/>
25.
<
telerik:GridBoundColumn
DataField
=
"TuneGenerated"
HeaderText
=
"Generated?"
/>
26.
<
telerik:GridBoundColumn
DataField
=
"TuneOrderCreationDateTime"
HeaderText
=
"Created"
/>
27.
<
telerik:GridBoundColumn
DataField
=
"SubmittedToZenDeskDateTime"
HeaderText
=
"Submitted"
/>
28.
</
Columns
>
29.
</
MasterTableView
>
30.
</
telerik:RadGrid
>
Export button code
1.
private
void
BtnExport_Click(
object
sender, EventArgs e)
2.
{
3.
gvDealerTunes.MasterTableView.ExportToPdf();
4.
}
Thanks in advance!!