Nested Repeater Ajaxification

5 posts, 0 answers
  1. Hari Prasad
    Hari  Prasad avatar
    16 posts
    Member since:
    Feb 2010

    Posted 29 Apr 2010 Link to this post

    I have aspx page(which contains master page), inside that user control is there(.ascx), inside this user control one more user control is there. Inside this user control, I have parent repeater in that i have image button and child repeater, inside the child repeater i have link button, i did ajaxification for image button. below is the detail code

     

    <

     

    asp:Repeater ID="ParentRepeater" runat="server">

     

     

     

     

     

    <ItemTemplate>

     

     

     

    <asp:ImageButton ID="ExpandCollapseImageButton"

     

     

    runat="server"

     

     

    CssClass="dimensionExpCol"

     

     

    ImageUrl='<%#Eval("ImageUrl")%>'

     

     

    OnClientClick='<%#Eval("Args", "OnClientClick(\"{0}\");return false;")%>'

     

     

     

     

     

     

    />

     

     

     

    <asp:Repeater ID="ChildRepeater" runat="server" DataSource='<%#Eval("LinkValues")%>'>

     

     

     

     

     

    <ItemTemplate>

     

     

     

     

     

    <div class="dimensionValueWrapper">

     

     

     

     

     

    <asp:LinkButton ID="ChildRepeaterLinkButton"

     

     

    runat="server"

     

     

    CssClass="dimensionValueName"

     

     

     

     

     

    Text='<%#Eval("DisplayName")%>'

     

     

    CommandName='<%#Eval("CommandName")%>'

     

     

     

     

     

    CommandArgument='<%#Eval("CommandArgument")%>'

     

     

     

     

     

    OnCommand="OnCommand"></asp:LinkButton>

     

     

    </div>

     

     

     

    </ItemTemplate>

     

     

     

     

     

    </asp:Repeater>

    In Code Behind:

     

    protected

     

    override void OnLoad(EventArgs e)

     

    {

     

    base.OnLoad(e);

     

     

    RadAjaxManager ajaxManager = RadAjaxManager.GetCurrent(Page);

     

     

    RadAjaxLoadingPanel loadingPanel =

     

    (

    RadAjaxLoadingPanel)Page.Master.FindControl("LoadingPanel");

     

    ajaxManager.AjaxRequest += OnAjaxManagerAjaxRequest;

     

    ajaxManager.AjaxSettings.AddAjaxSetting(

    ajaxManager, ParentRepeater, loadingPanel);

     

    RegisterJavaScript();

     

    }

     

    private

     

    void RegisterJavaScript()

     

    {

     

    string script =

     

     

    @"

     

    <script type=""text/javascript"">

     

    function OnClientClick(args)

    {

    var ajaxManager = $find("""

     

    + RadAjaxManager.GetCurrent(Page).ClientID + @""");

     

    ajaxManager.ajaxRequest(args);

    }

    </script>"

     

    ;

     

     

    ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "Test", script, false);

     

    }

     

    protected

     

    void OnAjaxManagerAjaxRequest(object sender, AjaxRequestEventArgs e)

     

    {
    //code has been implemented
    }

     

    protected

     

    void OnCommand(object sender, CommandEventArgs eventArgs)

     

    {
    }

    If i click on image button i.e working fine,JavaScript is firing(OnClientClick();) and Ajaxification is also working fine, but inside the child repeater if i click on link buttons total Repeater(Parent) is disappearing. Link button OnCommand event is firing. But I am not able to see the total Repeater. Actually if i click on link button, i am showing some results inside the Grid. I am getting those results as well. But Repeater is disappearing.

    Can you tell me the what will be the Reason and what would be the solution for that.

    Thanks in Advance

    Hari.

  2. Hari Prasad
    Hari  Prasad avatar
    16 posts
    Member since:
    Feb 2010

    Posted 29 Apr 2010 Link to this post

    Without Ajaxification it's working fine for me. I think because of Ajaxification only the Repeater is disappearing.

    Thanks
    Hari.
  3. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 04 May 2010 Link to this post

    Hi Hari,

    Can you try adding an ajax setting as below where the parent repeater updates itself and see if it makes any difference:

    ajaxManager.AjaxSettings.AddAjaxSetting(ParentRepeater, ParentRepeater, loadingPanel);


    Greetings,
    Iana
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  4. Hari Prasad
    Hari  Prasad avatar
    16 posts
    Member since:
    Feb 2010

    Posted 18 May 2010 Link to this post

    Sorry for late reply, my application was in some modifications, that's the reason why i was not able to test it.
    I have tested by keeping parent repeater. But still it's not working. Really i am not understanding what is happening here. Please suggest some more solutions.

    Thanks in advance,
    Hari.
  5. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 18 May 2010 Link to this post

    Hi Hari,

    Would it be convenient for you to send me a runnable version of your code, with sample data, etc.? I will debug it locally in order to replicate the issue and turn back to you with a resolution.

    Sincerely yours,
    Iana
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top