UserControl with AJAX in RadMenuItem

2 posts, 0 answers
  1. Fit2Page
    Fit2Page avatar
    456 posts
    Member since:
    Feb 2007

    Posted 08 Jun 2011 Link to this post

    I have a RadMenu in Mega Drop Down mode.
    A childitem is added, and a UserControl is added to the child.

    Code for adding the UserControl dynamically:
    e.Item.GroupSettings.ExpandDirection = ExpandDirection.Down
    e.Item.GroupSettings.OffsetX = "-476"
    childItem = New RadMenuItem()
    Dim uc_Products As products = DirectCast(LoadControl("~/includes/products/products.ascx"), products)
    In the userControl there is a Repeater which must be Ajaxified so that it can be updated while the menu item is expanded.
    I try it like so:

    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" />
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Width="600px" EnableAJAX="true"
    LoadingPanelID="RadAjaxLoadingPanel1" EnablePageHeadUpdate="True"
    <asp:Button Text="productlines" id="btn_productlines" runat=server />
    <asp:Repeater id="rpt_Footer" runat="server" OnItemCommand="UpdateProductGroups"
    <HeaderTemplate><ul class="ProductFooter"></HeaderTemplate>
    <li style="float:left;">
    <asp:Literal runat=server id="ltl_rewrite" Text='<%# Container.DataItem("rewrite") %>' />
    id="btn_Type" runat="server" />
    <asp:Label runat=server id="aa" Text="aaa" />
    And in the CodeBehind:
    Sub UpdateProductGroups(ByVal Sender As Object, ByVal e As RepeaterCommandEventArgs)
    aa.Text = "bbb"
    End Sub
    When I click in the Repeater a full Postback is occuring instead of an Ajax update.

    Any suggestions?

  2. Kate
    Kate avatar
    1898 posts

    Posted 14 Jun 2011 Link to this post

    Hello Fit2Page,

    I tested the scenario that you describe but I am not able to reproduce the issue that you encounter. Please take a look at the attached page and let me know if I am missing something. For the simple test i bind the menu item to a simple array. I also set AnimationDuration property, so that the ajax update animation can be visible. 

    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top