More in this section

Forums / Developing with Sitefinity / RadAjaxPanel Confusion

RadAjaxPanel Confusion

2 posts, 0 answered
  1. Michael
    Michael avatar
    17 posts
    12 Oct 2008
    29 Jan 2009
    Link to this post
    I am developing a user control that is part of an intra-site module.  The control has been added to a public page on my site.  Here is a simplified version of what I am doing....

    Control A:
    • has a radcombobox set to autopostback with some values loaded
    • has a private int variable called _myid defaulted to null
    • has a public property called MyId with a normal get and set
    • upon postback _myid is set to the value of the selection in the radcombobox
    Control B:
    • has a reference to Control A and wraps it in an upatepanel: <telerik:RadAjaxPanel ...><mycontrol:ControlA .../></telerik:RadAjaxPanel><asp:Panel id="outsidepanel" runat="server">stuff</asp:Panel>
    OK, so far so good.  Control A is ajaxified by the radajaxpanel and all is good.

    Except, I am trying to change the visibility of an asp panell, located in Control B but outside the radajaxpanel (see above) by evaluating the value of the public proptery MyId in Control this....

    protected void Page_PreRender(object sender, EventArgs e)
            if (ControlA .MyId != null)
                outsidepanel.Visible = true;          

    When debugging the code shows that the visibility has been set to true, as expected, but it never renders as visible on the page itself.  Inother words the panel stays hidden.

    Is this a problem that is related to sitefinity and the way controls are loaded onto the page?  Or, is this behaviour expected?
  2. Parvan
    Parvan avatar
    151 posts
    24 Sep 2012
    06 Feb 2009
    Link to this post
    Hello Michael,

    Here is an article that explains different ways to ajaxify a page (

    An easy, but not so effective solution is to wrap all content which should be updated in the RadAjaxPanel as below:

    <telerik:RadAjaxPanel ...> 
    <mycontrol:ControlA .../> 
    <asp:Panel id="outsidepanel" runat="server">stuff</asp:Panel>   

    The other solution is to use a RadAjaxManager (this is a KB article for using the RadAjaxManager in Sitefinity:
    I attached a solution for your case (do not forget to add RadAjaxManager in the master page).

    Hope this information will help you.

    Kind regards,
    the Telerik team

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