3 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 06 Mar 2013, 08:07 AM
Hi,
Unfortunately I cannot replicate the issue at my end. Here is the full code that I tried.
ASPX:
C#:
JS:
Thanks,
Shinu
Unfortunately I cannot replicate the issue at my end. Here is the full code that I tried.
ASPX:
<telerik:RadGrid AutoGenerateColumns="true" ID="RadGrid1" runat="server" DataSourceID="SqlDataSource2" Visible="false"> <ClientSettings> <ClientEvents OnGridCreated="GridCreated" /></ClientSettings></telerik:RadGrid>protected void Button2_Click(object sender, EventArgs e) { RadGrid1.Visible = true; }JS:
function GridCreated() { alert("fired"); }Thanks,
Shinu
0
rafalr
Top achievements
Rank 1
answered on 07 Mar 2013, 10:21 AM
Thanks Shinu for replay.
But I skip one information, my dynamically added UserControls are placed on RadAjaxPanel.
Here is a bit of my sample code:
C#
Aspx
But I skip one information, my dynamically added UserControls are placed on RadAjaxPanel.
Here is a bit of my sample code:
C#
public partial class TestForm : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { btnTest.Click += new EventHandler(btnTest_Click); for (int i = 0; i < Counter; i++) AddControl(); } public int Counter { get { int? cc = (int?)Session["counter"]; return cc.HasValue ? cc.Value : 0; } set { Session["counter"] = value; } } void btnTest_Click(object sender, EventArgs e) { AddControl(); Counter++; } private void AddControl() { Control ctrl = LoadControl(" path to my uc "); ajax.Controls.Add(ctrl); }Aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestForm.aspx.cs" Inherits="xxx.TestForm" MasterPageFile="~/MasterPages/MasterPage.Master"%><%@ Register Src="~/Controls/xxx/StatusUserControl.ascx" TagName="ucStatus" TagPrefix="uc" %><asp:Content ID="Head" ContentPlaceHolderID="HeadPlaceHolder" runat="server"></asp:Content><asp:Content ID="Content" ContentPlaceHolderID="ContentPlaceHolder" runat="server" > <telerik:RadButton ID="btnTest" runat="server" Text="Add grid" ></telerik:RadButton> <telerik:RadAjaxPanel ID="ajax" runat="server"/><telerik:RadAjaxManagerProxy ID="Proxy" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="btnTest"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="ajax" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings></telerik:RadAjaxManagerProxy> </asp:Content><asp:Content ID="pFooter" ContentPlaceHolderID="FooterPlaceHolder" runat="server"> <uc:ucStatus ID="status" runat="server" /></asp:Content>0
Hello Rafal,
Please note that using RadAjaxPanel simultaneously with RadAjaxManager or UpdatePanel ( or implementing multiple wrapped RadAjaxPanels ) is not a supported scenario and we highly recommend to avoid such implementation. Please either use just the manager to update your controls replacing the RadAjaxPanel with a regular asp:Panel, or use the RadAjaxPanel alone to wrap your page.
I hope the clarification was helpful.
Greetings,
Eyup
the Telerik team
Please note that using RadAjaxPanel simultaneously with RadAjaxManager or UpdatePanel ( or implementing multiple wrapped RadAjaxPanels ) is not a supported scenario and we highly recommend to avoid such implementation. Please either use just the manager to update your controls replacing the RadAjaxPanel with a regular asp:Panel, or use the RadAjaxPanel alone to wrap your page.
I hope the clarification was helpful.
Greetings,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
