More in this section

Forums / Developing with Sitefinity / Using RAD AJAX Controls in a Sitefinity Admin Module

Using RAD AJAX Controls in a Sitefinity Admin Module

5 posts, 0 answered
  1. Carl
    Carl avatar
    23 posts
    Registered:
    15 Jul 2008
    15 Sep 2008
    Link to this post
    I was wondering if there are any known issues with using the Rad AJAX controls (RADAjaxPanel and RADAjaxManager) in an Admin module?

    A while back I was getting errors when I had a RADAjaxManager in the Control panel, and then clicked on a link in the Command Panel. I decided to put this on hold until today, thinking it was something I was doing wrong.

    Today I've added a RADAjaxPanel to one of the ASCX files in the Control Panel, and everything within the Panel seems to work as expected. However, when I click on a link in the Command Panel, I get an error on the OnPreRender() method of the \Sitefinity\Admin\Modules.aspx.cs class.

    The exception that is thrown is an ArgumentNullException on base.OnPreRender(e). And the error message says "Value cannot be null.", for the Parameter name: key.

    System.ArgumentNullException was unhandled by user code
      Message="Value cannot be null.\r\nParameter name: key"
      Source="mscorlib"
      ParamName="key"
      StackTrace:
           at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
           at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
           at System.Collections.Generic.Dictionary`2.ContainsKey(TKey key)
           at Telerik.Web.UI.RadAjaxControl.CreateUpdatePanel(Control initiator, String eventName, Control updated)
           at Telerik.Web.UI.RadAjaxControl.OnPagePreRender(Object sender, EventArgs e)
           at System.EventHandler.Invoke(Object sender, EventArgs e)
           at System.Web.UI.Control.OnPreRender(EventArgs e)
           at Telerik.Cms.Web.AdminPage.OnPreRender(EventArgs e)
           at Modules.OnPreRender(EventArgs e) in c:\Documents and Settings\jlebel\My Documents\Visual Studio 2005\Projects\SMDHUWebsite\Source\SMDHUWebsite\Website\Sitefinity\Admin\Modules.aspx.cs:line 75
           at System.Web.UI.Control.PreRenderRecursiveInternal()
           at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


    As I mentioned above, this happens with both AJAX controls, and only when I click on a link in the Command Panel.

    Any help would be greatly appreciated.

    Thanks,
    Carl J
  2. Pepi
    Pepi avatar
    981 posts
    Registered:
    31 Jan 2017
    16 Sep 2008
    Link to this post
    Hi Carl,

    I would recommend you place the RadAjaxManager control in the ~/Sitefinity/Admin/Admin.master page. The ControlPanel template should be set to use RadAjaxManagerProxy control instead of RadAjaxManager. The proxy control is configured in the same way as the manager. Here is a simple example:


    .master:
    ... 
    <form id="form1" runat="server" style="height:100%;"
            <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" AsyncPostBackTimeout="600"
                <Scripts> 
                    <asp:ScriptReference Path="Scripts/personalization.js" /> 
                </Scripts> 
            </asp:ScriptManager> 
            <telerik:RadAjaxManager ID="AjaxManager1" runat="server"></telerik:RadAjaxManager> 
    ... 

    .ascx:
    <telerik:RadAjaxManagerProxy id="AjaxManagerProxy1" runat="server"
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="treeView"
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="treeView" LoadingPanelID="loadingPanel" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
    </telerik:RadAjaxManagerProxy> 

    Do let us know if this helps.

    Best wishes,
    Pepi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Carl
    Carl avatar
    23 posts
    Registered:
    15 Jul 2008
    16 Sep 2008
    Link to this post
    Thanks again Pepi. That seemed to have so far solved that problem, however the Ajax Manager Proxy is causing some other weird quirks, but most of them only occur in IE (7).

    Why is it that whatever control needs to be updated, it's wrapped in a div container?

    I have a hidden field, and an empty span tag. Both of them noticably expand vertically when I click on another control. These two controls are marked as UpdatedControls. The hidden field to store a value and the span tag to display a message when there is an error.

    Thanks again for your help.
  4. Carl
    Carl avatar
    23 posts
    Registered:
    15 Jul 2008
    17 Sep 2008
    Link to this post

    I've managed to solve my Ajax Manager Proxy problem that I was having, by wrapping all of the controls with an asp panel, then setting the controlid and ajaxupdatedcontrol's controlid to the Id of the panel. For what I'm doing this will work, in some other scenarios I may want to bind multiple panels.


    Thanks again Pepi,
    Carl J


  5. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    17 Sep 2008
    Link to this post
    Hello Carl,

    We are glad that the problems are solved.
    Please do not hesitate to contact us if you have any other questions.

    Greetings,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
5 posts, 0 answered