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.