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> |
have an application in VS2008, I control the code with Team foundation, I I had to change my equipment and after installing all the components and software necessary and to again put the code in the new computer, the code no longer works of the same form.
the event OnClientItemsRequested= " UpdateItemCountField " no longer goes off. I have put alert and not even that sends, that is to say, it does not happen that way.
<telerik:RadComboBox ID="rcmdProgra" runat="server" Height="120px" Width="250px"
EmptyMessage="Programas" DataTextField="Nombre" DataValueField="Clave"
DropDownWidth="370px" EnableLoadOnDemand="true" EnableEmbeddedScripts="true"
Font-Size="XX-Small"
OnClientKeyPressing="ChangeValueRCB"
OnClientItemsRequested="UpdateItemCountField"
OnClientSelectedIndexChanged="selectedProgram"
OnItemsRequested="rcmbProgra_ItemsRequested">
it is possible to mention that in the other equipment, which does not install I, he himself code worked correctly; single it changes to me of equipment, needs to me to install something.
and databind() in server side not working now... not send error but no show me the rows
I hope can help me please. thank you very much.
Is there a way to change the background color of a menu item through javascript? I've tried the adding the following code to the OnClientShowing event but it did not seem work:
var item = sender.get_items().getItem(1);
item.set_cssClass(
'blue_bkgd');
Thanks,
Mike
| <telerik:RadComboBox ID="ddlTextSearch" runat="server" AllowCustomText="True" EnableLoadOnDemand="True" |
| ShowDropDownOnTextboxClick="False" ShowToggleImage="False" onclientitemsrequesting="ddlTextSearch_ItemRequesting" OnClientSelectedIndexChanged="ddlTextSearch_SelectionChanged" ZIndex="9900"> |
| <WebServiceSettings Method="GetCompletionList" Path="~/TextSearchAutoComplete.aspx" /> |
| </telerik:RadComboBox> |
| function ddlTextSearch_HandleKeyPress(e) |
| { |
| if (!e) e = event; |
| var keyCode = e.keyCode || e.which; |
| if (keyCode == 13) |
| { |
| var combo = $find("<%= ddlTextSearch.ClientID %>"); |
| var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>"); |
| if (combo && combo.get_highlightedItem() != null) |
| { |
| ajaxManager.ajaxRequestWithTarget("<%= ddlTextSearch.UniqueID %>","<%= WebUtils.HttpRequestEventArguments.SearchAssist %>"); |
| } |
| else |
| { |
| ajaxManager.ajaxRequestWithTarget("<%= ddlTextSearch.UniqueID %>","<%= WebUtils.HttpRequestEventArguments.Search %>"); |
| } |
| } |
| } |
| // Telerik workaround for enter key when ddl is loading. |
| var $ = $telerik.$; |
| $(document).ready(function(){$("#" + "<%= ddlTextSearch.ClientID %>" + "_Input").keydown(ddlTextSearch_HandleKeyPress);}); |
| // Telerik workaround for not selecting cell text when clicking on txtbox. |
| Telerik.Web.UI.RadComboBox.prototype._onInputCellClick = function(e) |
| { |
| if (this._enabled) { |
| // if (this.get_text() !== this.get_emptyMessage()) |
| // this.selectText(0, this.get_text().length); |
| if (!this.get_dropDownVisible() && this._showDropDownOnTextboxClick) |
| this._showDropDown(e); |
| return true; |
| } |
| } |
| function ddlTextSearch_SelectionChanged(sender, eventArgs) |
| { |
| if (eventArgs.get_domEvent().type == "click") |
| { |
| var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>"); |
| if (ajaxManager) |
| { |
| ajaxManager.ajaxRequestWithTarget("<%= ddlTextSearch.UniqueID %>","<%= WebUtils.HttpRequestEventArguments.SearchAssist %>"); |
| } |
| } |
| } |
| function ddlTextSearch_ItemRequesting(sender, eventArgs) |
| { |
| var context = eventArgs.get_context(); |
| /* Setting a few context parameters - code removed */ |
| } |
<telerik:RadColorPicker ID="rcpKleurLicht" runat="server"
PaletteModes="HSV"
PreviewColor="true"
ShowIcon="true"
Width="185px"
Skin="Windows7"
ShowEmptyColor="false">
</telerik:RadColorPicker>
We have the following problem. The first time we load the controls everything is fine, we put our defined color in the SelectedColor and it shows op as an icon. If you click on it you see the HSV window. Then we save our data using a normal postback and edit the item again. Now the lay-out of the color picker changes, to something completely different. Can anybody explain us why this happens?
We use Telerik for ASP.NET/AJAX version 2009.3.1314.35
I've attached a document to show the layout change.
Thanks in advance.
Patrick