Scenario:
I dynamically (with RadAjaxManager) loaded a UserControl, called Uc1, where a UserControl, Uc2, resides within Grid's Template Column.
Initially, the Grid is shown as follows:
http://www.sendspace.com/file/i1pscp and when users click any LinkButton, the Uc1 belongging to that Column will be loaded as follows:
http://www.sendspace.com/file/c9oa0m
Problem:
The problem is clicking buttons within Red box will automatically fire ajax postbacks, while the button (within Uc2) in the Blue Box still raises normal postback. Why? How do I let buttons at Uc2 raise ajax postback as well?
For c# code implemention, I assign each GridDataItem to Ajaxify the Container Panel where Uc1 resides. And the markup of Container_Panel is at bottom.
protected void MsgGrid_ItemCreated(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
GridDataItem item = (e.Item as GridDataItem);
// Attach click event handler to Title_Btn
LinkButton titleBtn = (LinkButton) item["ContentColumn"].FindControl("Title_Btn");
titleBtn.Click += new EventHandler(TitleBtn_Clicked);
// Set Ajax source and target
Panel loadPanel = (Panel)item["ContentColumn"].FindControl("Container_Panel");
RadAjaxManagerProxy1.AjaxSettings.AddAjaxSetting(item, loadPanel);
}
}
-------------------------------------------------------------------------------
<ItemTemplate>
<asp:Panel ID="Container_Panel" runat="server">
<div runat="server" class="headerPanel" >
<%--<asp:Label ID="Title_Lbl" runat="server" Text='<%# Eval("Title") %>'></asp:Label>--%>
<div style="width:400px;min-width: 400px;float:left;">
<asp:LinkButton ID="Title_Btn" runat="server" Text='<%# Eval("Title") %>' style="width:200px;min-width: 200px;color:Navy"></asp:LinkButton>
<asp:Label ID="SourceName_Lbl" runat="server" style="width:150px" ></asp:Label> <%-- Bind at runtime--%></div>
<div style="text-align:right;float:right ">
<asp:Label ID="CreateTime_Lbl" runat="server" Text='<%# Eval("CreateTime", "{0:G}") %>' ></asp:Label>
</div>
</div>
<div runat="server" style="clear:both;height:0px;display:none" id="Loading_Panel_container">
</div>
<dbwc:dynamiccontrolsplaceholder id="Loading_Panel" runat="server" ControlsWithoutIDs="DontPersist" ></dbwc:dynamiccontrolsplaceholder>
</asp:Panel>
</ItemTemplate>
Thanks for your help.
Ricky.