Hi,
We need to add 2 user controls to an aspx file, these 2 user controls have one telerik ajax manager each. but telerik only allows one ajax manager in a web page. I am getting exception while running the app.
Is there any way work around for this?
Regards,
Joe.<
telerik:RadGrid runat="server" ID="DGE" AllowSorting="false" AllowMultiRowSelection="true"
AutoGenerateColumns="false" EnableEmbeddedSkins="false" Skin="NextGen" Visible="true"
OnItemDataBound="Grid_ItemDataBound" EnableEmbeddedScripts="false" >
<ClientSettings EnableRowHoverStyle="true">
<Scrolling AllowScroll="true" ScrollHeight="120px" UseStaticHeaders="true" />
<Selecting AllowRowSelect="true" EnableDragToSelectRows="true" />
<Resizing ClipCellContentOnResize="true" AllowColumnResize="true" AllowRowResize="True" ResizeGridOnColumnResize="true" />
</ClientSettings>
<MasterTableView AutoGenerateColumns="false" GroupsDefaultExpanded="true" TableLayout="Auto">
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<Columns>
<telerik:GridTemplateColumn HeaderStyle-HorizontalAlign="Center" HeaderText="" UniqueName="RecordCount"
HeaderStyle-Width="23px" Visible="true">
<ItemStyle HorizontalAlign="Center" />
<ItemTemplate>
<%
# Container.ItemIndex + 1 %>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Left" >
<HeaderStyle Wrap="false" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn AllowSorting="false" DataField="PaymentAmount" HeaderStyle-HorizontalAlign="Left"
>
<HeaderStyle Wrap="false" />
<ItemStyle HorizontalAlign="Right" Wrap="false" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="PaymentCurrency" HeaderStyle-HorizontalAlign="Left"
">
<HeaderStyle Wrap="false" />
<ItemStyle Wrap="false" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Left" >
<ItemStyle Wrap="false" />
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn >
<ItemTemplate>
<asp:Label ID="lblSM" runat="server"></asp:Label>
<telerik:RadToolTip ID="ttMsg" Text='' runat="server" RelativeTo="Mouse" AutoCloseDelay="50000"
EnableEmbeddedSkins="false" Skin="NextGen" TargetControlID="lblSM" EnableViewState="false">
</telerik:RadToolTip>
</ItemTemplate>
<ItemStyle Wrap="false" />
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
<FilterMenu EnableTheming="True">
<CollapseAnimation Duration="200" Type="OutQuint" />
</FilterMenu>
<ClientSettings AllowDragToGroup="false" AllowGroupExpandCollapse="true" ReorderColumnsOnClient="false">
<Selecting AllowRowSelect="True" />
</ClientSettings>
<GroupingSettings UnGroupTooltip="true" />
</telerik:RadGrid>
Expecting your reply.
Hi,
These are issues that have been reported by others. I am raising them as a bug reports to be evaluated by Telerik staff. There are two issues reported here.
Scenario: simple app - a RadTreeView on the left, clicking on a node dynamically loads a bunch of RadControls on the right.
Issue 1: If the controls on the right are displayed for the first time (i.e. first click on the corresponding node), they are displayed just fine. However, the second time a user visits a node, the following error is shown: "Script control may not be registered after PreRender".
The stack trace is below. It is obvious from the highlighted lines what generates the problem and I don't have any control over it. Kindly suggest a workaround or issue a fix
[InvalidOperationException: Script controls may not be registered after PreRender.]
System.Web.UI.ScriptControlManager.RegisterScriptControl(TScriptControl scriptControl) +269
System.Web.UI.ScriptManager.RegisterScriptControl(TScriptControl scriptControl) +99
Telerik.Web.UI.RadWebControl.RegisterScriptControl() +43
Telerik.Web.UI.RadWebControl.OnPreRender(EventArgs e) +39
Telerik.Web.UI.RadInputControl.OnPreRender(EventArgs e) +28
System.Web.UI.Control.PreRenderRecursiveInternal() +86
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
Issue 2: Same scenario. When doing an action that postbacks the page, the tree is reloaded/rerendered. When this happens, a javascript error occurs:
"Sys.InvalidOperationException: A control is already associated with the element.
Code 0."
This is a showstopper and as of yet I have no explanation for it.
Both problems didn't exist before moving to the new version of the controls.
Thanks,
Cristian
| <telerik:radeditor id="tBody" runat="server" Skin="Black" Height="500px" |
| ToolsFile="~/assets/ToolsFile.xml" Width="630px" AllowScripts="True" |
| AutoResizeHeight="True" > |
| <CssFiles> |
| <telerik:EditorCssFile Value="~/assets/EditorContentArea.css" /> |
| </CssFiles> |
| <ImageManager DeletePaths="~/images" UploadPaths="~/images" ViewPaths="~/images" MaxUploadFileSize="99999999" /> |
| <DocumentManager DeletePaths="~/docs" UploadPaths="~/docs" ViewPaths="~/docs" MaxUploadFileSize="99999999" /> |
| <FlashManager DeletePaths="~/flash/uploads" UploadPaths="~/flash/uploads" ViewPaths="~/flash/uploads" /> |
| <MediaManager MaxUploadFileSize="99999999" /> |
| <Content> |
| </Content> |
| </telerik:radeditor> |
| <?xml version="1.0" encoding="utf-8" ?> |
| <root> |
| <tools name="MainToolbar"> |
| <tool name="Print" shortcut="CTRL+P"/> |
| <tool name="AjaxSpellCheck"/> |
| <tool name="FindAndReplace" shortcut="CTRL+F"/> |
| <tool name="Cut" /> |
| <tool name="Copy" shortcut="CTRL+C"/> |
| <tool name="Paste" shortcut="CTRL+V"/> |
| <tool name="PasteStrip"/> |
| <tool separator="true"/> |
| <tool name="Undo" shortcut="CTRL+Z"/> |
| <tool name="Redo" shortcut="CTRL+Y"/> |
| </tools> |
| <tools name="InsertToolbar" > |
| <tool name="ImageManager" shortcut="CTRL+G"/> |
| <tool name="AbsolutePosition" /> |
| <tool separator="true"/> |
| <tool name="FlashManager" /> |
| <tool name="MediaManager" /> |
| <tool name="DocumentManager" /> |
| <tool separator="true"/> |
| <tool name="LinkManager" shortcut="CTRL+K"/> |
| <tool name="Unlink" shortcut="CTRL+SHIFT+K"/> |
| </tools> |
| <tools> |
| <tool name="Superscript" /> |
| <tool name="Subscript" /> |
| <tool name="InsertParagraph" /> |
| <tool name="InsertGroupbox" /> |
| <tool name="InsertHorizontalRule" /> |
| <tool name="InsertDate" /> |
| <tool name="InsertTime" /> |
| </tools> |
| <tools> |
| <tool name="FormatBlock"/> |
| <tool name="FontName" shortcut="CTRL+SHIFT+F"/> |
| <!--tool name="RealFontSize" shortcut="CTRL+SHIFT+P"/--> |
| <tool name="FontSize" shortcut="CTRL+SHIFT+P"/> |
| </tools> |
| <tools> |
| <tool name="SelectAll" shortcut="CTRL+A"/> |
| <tool separator="true"/> |
| <tool name="Bold" shortcut="CTRL+B"/> |
| <tool name="Italic" shortcut="CTRL+I"/> |
| <tool name="Underline" shortcut="CTRL+U"/> |
| <tool name="StrikeThrough" /> |
| <tool separator="true"/> |
| <tool name="JustifyLeft" /> |
| <tool name="JustifyCenter" /> |
| <tool name="JustifyRight" /> |
| <tool name="JustifyFull" /> |
| <tool name="JustifyNone" /> |
| <tool separator="true"/> |
| <tool name="Indent" /> |
| <tool name="Outdent" /> |
| <tool separator="true"/> |
| <tool name="InsertOrderedList" /> |
| <tool name="InsertUnorderedList" /> |
| <tool name="ToggleTableBorder" /> |
| </tools> |
| <tools> |
| <tool name="ForeColor"/> |
| <tool name="BackColor"/> |
| <tool name="FormatStripper"/> |
| </tools> |
| <tools name="DropdownToolbar" > |
| <tool name="InsertSymbol"/> |
| <tool name="InsertTable"/> |
| <tool name="ImageMapDialog"/> |
| <tool separator="true"/> |
| <tool name="ConvertToLower" /> |
| <tool name="ConvertToUpper" /> |
| <tool separator="true"/> |
| </tools> |
| <snippets> |
| <snippet name="Order Confirmation"> |
| <![CDATA[ |
| <div style="width:300px;border:2px outset #D8D2BD;padding:34px;font-family:Arial, Verdana; font-size:11px;background-color:#F1EFE6;"> |
| Dear ____________________,<br /> |
| Thank you for inquiring about ____________. Your request will be processed in 48 hours and shipped at the address you have provided. |
| <br /><br /> |
| <b>Please, contact us if you have any problems.</b> |
| </div> |
| ]]> |
| </snippet> |
| <snippet name="Email Signature"> |
| <![CDATA[ |
| <div style="margin-top:30px;width:80%;border-top:1px dotted gray;padding-top:4px;font-family:Arial, Verdana; font-size:11px;"> |
| <b>John Wigham</b><br /> |
| Senior Web Developer<br /> |
| <a href=<color value="#">john@mysite.com</a> |
| <br /> |
| <br /> |
| <i>Disclaimer: The contents of this e-mail are privileged and confidential and intended for the addressees at the specified e-mail addresses only.</i> |
| </div> |
| ]]> |
| </snippet> |
| <snippet name="Problem Report Feedback"> |
| <![CDATA[ |
| <div style="width:300px;border:2px outset #D8D2BD;padding:34px;font-family:Arial, Verdana; font-size:11px;background-color:#F1EFE6;"> |
| Hi ____________________,<br /> |
| Thank you for reporting this issue. We have verified the problem and it is logged in our system. We will notify you once we have a solution. |
| <br /><br /> |
| <b>Please, contact us if you have any problems.</b> |
| </div> |
| ]]> |
| </snippet> |
| </snippets> |
| <contextMenus> |
| <contextMenu forElement="IMG"> |
| <tool Name="SetImageProperties" /> |
| <tool Name="ImageMapDialog" /> |
| <tool Name="LinkManager" /> |
| </contextMenu> |
| <contextMenu forElement="TABLE"> |
| <tool Name="ToggleTableBorder" /> |
| <tool Name="SetTableProperties" /> |
| <tool Name="DeleteTable" /> |
| </contextMenu> |
| <contextMenu forElement="TD"> |
| <tool Name="LinkManager" /> |
| <tool Name="InsertRowAbove" /> |
| <tool Name="InsertRowBelow" /> |
| <tool Name="DeleteRow" /> |
| <tool Name="InsertColumnLeft" /> |
| <tool Name="InsertColumnRight" /> |
| <tool Name="MergeColumns" /> |
| <tool Name="MergeRows" /> |
| <tool Name="SplitCell" /> |
| <tool Name="DeleteCell" /> |
| <tool Name="SetCellProperties" /> |
| </contextMenu> |
| <contextMenu forElement="A"> |
| <tool Name="LinkManager" /> |
| <tool Name="SetLinkProperties" /> |
| <tool Name="Unlink" /> |
| </contextMenu> |
| <contextMenu forElement="BODY"> |
| <tool Name="Cut" /> |
| <tool Name="Copy" /> |
| <tool Name="Paste" /> |
| <tool Name="PasteFromWord" /> |
| <tool Name="PastePlainText" /> |
| <tool Name="PasteAsHtml" /> |
| </contextMenu> |
| </contextMenus> |
| <symbols> |
| <symbol value="€" /> |
| <symbol value="¢" /> |
| <symbol value="£" /> |
| <symbol value="¥" /> |
| <symbol value="¤" /> |
| <symbol value="©" /> |
| <symbol value="®" /> |
| <symbol value="™" /> |
| <symbol value="±" /> |
| <symbol value="≠" /> |
| <symbol value="≈" /> |
| <symbol value="≤" /> |
| <symbol value="≥" /> |
| <symbol value="÷" /> |
| <symbol value="×" /> |
| <symbol value="∞" /> |
| <symbol value="½" /> |
| <symbol value="¼" /> |
| <symbol value="¾" /> |
| <symbol value="²" /> |
| <symbol value="³" /> |
| <symbol value="‰" /> |
| <symbol value="¶" /> |
| <symbol value="§" /> |
| <symbol value="α" /> |
| <symbol value="β" /> |
| <symbol value="Δ" /> |
| <symbol value="µ" /> |
| <symbol value="Ω" /> |
| <symbol value="∑" /> |
| <symbol value="Ø" /> |
| <symbol value="∠" /> |
| <symbol value="º" /> |
| <symbol value="«" /> |
| <symbol value="»" /> |
| <symbol value="·" /> |
| <symbol value="•" /> |
| <symbol value="†" /> |
| <symbol value="‡" /> |
| <symbol value="ƒ" /> |
| </symbols> |
| <colors> |
| <color value="" /> |
| <color value="#ffffff" /> |
| <color value="#ffcc99" /> |
| <color value="#ffff99" /> |
| <color value="#ffffcc" /> |
| <color value="#99ff99" /> |
| <color value="#99ffff" /> |
| <color value="#ccffff" /> |
| <color value="#ccccff" /> |
| <color value="#ffccff" /> |
| <color value="#cccccc" /> |
| <color value="#ff6666" /> |
| <color value="#ff9966" /> |
| <color value="#ffff66" /> |
| <color value="#ffff33" /> |
| <color value="#66ff99" /> |
| <color value="#33ffff" /> |
| <color value="#66ffff" /> |
| <color value="#9999ff" /> |
| <color value="#ff99ff" /> |
| <color value="#c0c0c0" /> |
| <color value="#ff0000" /> |
| <color value="#ff9900" /> |
| <color value="#ffcc66" /> |
| <color value="#ffff00" /> |
| <color value="#33ff33" /> |
| <color value="#66cccc" /> |
| <color value="#33ccff" /> |
| <color value="#6666cc" /> |
| <color value="#cc66cc" /> |
| <color value="#999999" /> |
| <color value="#cc0000" /> |
| <color value="#FF6600" /> |
| <color value="#FFCC33" /> |
| <color value="#FFCC00" /> |
| <color value="#33CC00" /> |
| <color value="#00CCCC" /> |
| <color value="#3366FF" /> |
| <color value="#6633FF" /> |
| <color value="#CC33CC" /> |
| <color value="#666666" /> |
| <color value="#990000" /> |
| <color value="#cc6600" /> |
| <color value="#cc9933" /> |
| <color value="#999900" /> |
| <color value="#009900" /> |
| <color value="#339999" /> |
| <color value="#3333ff" /> |
| <color value="#6600cc" /> |
| <color value="#993399" /> |
| <color value="#333333" /> |
| <color value="#660000" /> |
| <color value="#993300" /> |
| <color value="#996633" /> |
| <color value="#666600" /> |
| <color value="#006600" /> |
| <color value="#336666" /> |
| <color value="#000099" /> |
| <color value="#333399" /> |
| <color value="#663366" /> |
| <color value="#000000" /> |
| <color value="#330000" /> |
| <color value="#663300" /> |
| <color value="#663333" /> |
| <color value="#333300" /> |
| <color value="#003300" /> |
| <color value="#003333" /> |
| <color value="#000066" /> |
| <color value="#330099" /> |
| <color value="#330033" /> |
| </colors> |
| </root> |