For some months now we have been working on a large .NET application that will serve as the Proposal Development System for our company. Because the methods of developing proposals vary significantly between the Eastern and Western divisions of our company, we have developed some of our pages to display Eastern or Western versions of themselves depending on the location of the user. This is accomplished by first determining the user’s location and then by loading appropriate user controls (.ascx) depending on that location.
In our application we have a web page (.aspx) which, in turn contains an update panel. This update Panel contains a placeholder into which an appropriate user control (Eastern or Western) will eventually be loaded. The main .aspx page also contains a checkbox which, when checked will indicate that some of the buttons on the screen need to be disabled. One of these buttons is actually contained in the user control.
In addition to the button, the .ascx controls also contains a RadGrid. In both Eastern and Western .ascx controls the RadGrids are named WBSGrid.
Finally the .aspx page contains both a ScriptManager ( actually a ScriptManagerProxy, as the actual ScriptManager is contained in our Master Page) and a RadAjaxManager.
The Update Panel in the .aspx document is defined as follows:
<asp:UpdatePanel ID="WBSUpdatePanel" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Panel ID="pnlWBSControls" runat="server"
Style="padding: 5px;"
ScrollBars="None">
<asp:PlaceHolder ID="phPnlWBSControls" runat="server"></asp:PlaceHolder>
</asp:Panel>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ckbLocked" />
</Triggers>
</asp:UpdatePanel>
Notice the placeholder, phpnlWBSControls, where we will load our ascx controls. The trigger is required to allow the contents of the Update Panel to be re-rendered when the trigger changes.
There is also a RadAjaxManager in the .aspx document which references WBSGrid and is defined as follows:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="TeamMembersGrid" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="TeamMembersGrid">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="TeamMembersGrid" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="WBSGrid" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="WBSGrid">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="WBSGrid" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
Here is our problem:
1. Let’s presume, for the moment, that we start with the checkbox not checked. If, for the life of the event in which the page participates, we do not check it, the page performs flawlessly.
2. If we check the checkbox, the following problems crop up:
a. The button we are trying to disable in the user control is disabled. However we also want to hide the Command Item Display of the Grid and this does not happen
b. We receive an ajaxified error message ‘A Control is already associated with the element’ – we believe the ‘element’ to be the RadGrid from the user control.
c. If we then attempt (within the same session) to make any alterations within the RadGrid the display becomes corrupted. Essentially all of the headings within the RadGrid are shifted to the far right of the page with all of the rows within the grid being shifted to the far left of the page.
d. If we try to add a new record to the grid using the Command Item Display that we had tried to hide, the add fails silently and we see the corrupted screen described earlier.
e. If we leave the checkbox checked, navigate away from the page in question, and come back in with the same transaction, the RadGrid’s rendering and behavior seem to be corrected.
f. If after doing step e we uncheck the checkbox we receive the error mentioned in step b and the RadGrid reverts back to it’s unusual behavior.
3. If I comment out the line of code that tries to hide the Command Item Display within the RadGrid, the error message from item c persists but the RadGrid does not get corrupted.
4. Removing the Triggers note from the Update Panel and/or changing the Update Mode to ‘Always’ does not correct the problem.
Can you suggest a solution?
Hello everyone
We are using the Telerik RadEditor for MOSS and have stumbled upon a problem with upgrading the editor.
A WebPart exists that uses the default content editor in moss, but when editing it, it is edited by the 5.2 version of the RadEditor. This seems to cause a problem after our upgrade to 5.5, where the following error occurs:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Invalid Configuration File:/_wpresources/RadEditorSharePoint/5.2.0.0__1f131a624888eeed/Resources/ConfigFile.xml
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Exception: Invalid Configuration File:/_wpresources/RadEditorSharePoint/5.2.0.0__1f131a624888eeed/Resources/ConfigFile.xml
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[Exception: Invalid Configuration File:/_wpresources/RadEditorSharePoint/5.2.0.0__1f131a624888eeed/Resources/ConfigFile.xml]
Telerik.SharePoint.MOSSRadEditor.GetValidConfigFile() +208
Telerik.SharePoint.MOSSRadEditor.ProcessConfigFile() +125
Telerik.SharePoint.MOSSRadEditor.OnLoad(EventArgs e) +20
System.Web.UI.Control.LoadRecursive() +66
System.Web.UI.Control.AddedControl(Control control, Int32 index) +350
Telerik.SharePoint.RadEditorToolPart.OnPreRender(EventArgs e) +150
System.Web.UI.Control.PreRenderRecursiveInternal() +108
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3394
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082
Contents of the config file (/_wpresources/RadEditorSharePoint/5.2.0.0__1f131a624888eeed/Resources/ConfigFile.xml):
<configuration>
<property name="AllowThumbGeneration">True</property>
<property name="ConvertToXhtml">True</property>
<property name="enableXHTML">True</property>
<property name="EnableDocking">False</property>
<property name="ShowHtmlMode">True</property>
<property name="ShowPreviewMode">False</property>
<property name="ToolbarMode">ShowOnFocus</property>
<property name="ToolsWidth">800px</property>
<property name="Width">400px</property>
<property name="Skin">Office2007</property>
<property name="NewLineBr">false</property>
<property name="CausesValidation">true</property>
</configuration>
The WebPart that is placed on the webpage is configured like so:
<?xml version="1.0" encoding="utf-8"?>
<WebPart xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/WebPart/v2">
<Title>Kampagne</Title>
<FrameType>None</FrameType>
<Description>Bruges til at udarbejde et kampagne med HTML</Description>
<IsIncluded>true</IsIncluded>
<ZoneID>EmnesideBundVenstre</ZoneID>
<PartOrder>1</PartOrder>
<FrameState>Normal</FrameState>
<Height />
<Width />
<AllowRemove>true</AllowRemove>
<AllowZoneChange>true</AllowZoneChange>
<AllowMinimize>true</AllowMinimize>
<AllowConnect>true</AllowConnect>
<AllowEdit>true</AllowEdit>
<AllowHide>true</AllowHide>
<IsVisible>true</IsVisible>
<DetailLink />
<HelpLink />
<HelpMode>Modeless</HelpMode>
<Dir>Default</Dir>
<PartImageSmall />
<MissingAssembly>Webdelen kan ikke importeres.</MissingAssembly>
<PartImageLarge>/_layouts/images/mscontl.gif</PartImageLarge>
<IsIncludedFilter />
<Assembly>Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
<TypeName>Microsoft.SharePoint.WebPartPages.ContentEditorWebPart</TypeName>
<ContentLink xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor" />
<Content xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor"><![CDATA[ <div class="RSJheading RSJcampaign">
<h1>Kampagnefelt</h1>
</div>
<div class="RJSimage">
<img src="/_layouts/1030/images/rsjIntra/temp_campaign01.jpg" alt="Kampagne1" />
</div>
<div class="RSJcontent">
<b><a href="#" class="RSJreadmore">Lorem ipsum purus egastas</a></b>
Duis aute in voluptate velit esse cillum dolore eu fugiat nulla parit.
</div>
<hr class="RSJaccessibility"/>]]></Content>
<PartStorage xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor" />
</WebPart>
But when editing the WebPart, the problem occurs.
How do I set the default editor to the new version 5.5?
I have edited the web.config file and added:
<!-- Rad Editor, 1.0.0.0 -> 5.5 -->
<dependentAssembly>
<assemblyIdentity name="RadEditorSharePoint" publicKeyToken="1f131a624888eeed" culture="neutral" />
<bindingRedirect oldVersion="1.0.0.0-5.4.0.0" newVersion="5.5.0.0" />
</dependentAssembly>
<!-- /Rad editor -->
Can anybody help?
| <asp:Panel ID="GridPanel" runat="server"> |
| <a id="LINKIT">TEXT FOR ROLLOVER</a> |
| </asp:Panel> |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| StringBuilder daText = new StringBuilder(); |
| daText.Append("TEST<br>"); |
| daText.Append("TEST<br>"); |
| daText.Append("TEST<br>"); |
| RadToolTip rtp1 = new RadToolTip(); |
| rtp1.Skin = "Vista"; |
| rtp1.Text = daText.ToString(); |
| rtp1.Sticky = true; |
| rtp1.Position = ToolTipPosition.BottomCenter; |
| rtp1.TargetControlID = "LINKIT"; |
| rtp1.IsClientID = true; |
| rtp1.ShowEvent = ToolTipShowEvent.OnMouseOver; |
| rtp1.Width = new Unit("300px"); |
| rtp1.Height = new Unit("250px"); |
| rtp1.Animation = ToolTipAnimation.Fade; |
| rtp1.HideEvent = ToolTipHideEvent.LeaveToolTip; |
| rtp1.ContentScrolling = ToolTipScrolling.Auto; |
| GridPanel.Controls.Add(rtp1); |
| } |