This is a migrated thread and some comments may be shown as answers.

Dynamically created controls do not update correctly

11 Answers 180 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Stoop
Top achievements
Rank 1
Stoop asked on 13 Jun 2007, 03:47 AM
Hello

I have a page in which I have an ASP.NET table. At run time, I populate the table with rows from a database. In these rows, I dynamically create a link button, set the link button's id to a unique value, and add the handler for the link button. In the RadAjaxAjaxManagerProxy (this is a content page), I checked the table control, and set tit to update an APS.NET panel. When I click on one of the dynamically created link button the handler event fires and does what it is supposed to do, however, the target panel shows the LoadingPanel over the panel, then all the controls in the target panel simply disappear.

Here's the kicker: If I add a STATIC linkbutton and configure it to update the target panel ,and call the exact same method, the panel's controls update just fine.

Here is kicker #2. This is the first page I tried converting to "Prometheus" I have other pages (also content pages) with the exact same design where I am using Q1 2007 RAD Controls with an RADAjaxManager, RADAjaxoadingPanel and those pages work just fine. The dynamically created linkbuttons update the target panel as they are supposed to.

So what's up with "Prometheus"??

11 Answers, 1 is accepted

Sort by
0
Chris Gillies
Top achievements
Rank 1
answered on 13 Jun 2007, 02:39 PM
In which part of the page life cycle are these buttons ajaxified? If these buttons do not have parent this may cause such problems.
0
Stoop
Top achievements
Rank 1
answered on 13 Jun 2007, 05:18 PM
Hi

I'm not sure what you mean by at what point in the page atre the dynamic link buttons being "ajaxified", but the table is populates with the dynamic rows that contain the dynamic link buttons during the Page_Init() method..

Like I mentioned above. Using the Q1 RAD Controls with a RADAjaxMnager and RAD LoadingPanel in the actual content page it works fine. However, Using a Promethius and having a RADAjaxMnager and ScriptManager in the master page, with a RADAjaxMnagerProxy and ScriptManagerProxy I get the behavior described above.   
0
Vlad
Telerik team
answered on 14 Jun 2007, 07:38 AM
Hi Stoop,

Please post an example (through the support ticketing system) where we can reproduce this weird behavior and we will gladly help you resolve the problem.

Regards,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Stoop
Top achievements
Rank 1
answered on 14 Jun 2007, 04:59 PM
Hello

I ahve created an example project that replicates the behavior I described above.  I have created and sent  support ticket with this project. Looking forward to hearing from you.

Steve
0
Stoop
Top achievements
Rank 1
answered on 20 Jun 2007, 04:20 PM
Hello

It has been a week since I submitted the example code that you [telerik] requested. I have not heard anything since. Is this a bug? If so, will it be fixed in a future release? Could be so kind as to let me know the progress of this issue? Thank you
0
Sebastian
Telerik team
answered on 21 Jun 2007, 06:54 AM
Hi Stoop,

I checked our account in our system and found that your support ticket has been answered by my colleague Vlad within 15 hours. Review the reply along with the sample project attached to this support ticket and let me know if you have further questions.

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Stoop
Top achievements
Rank 1
answered on 21 Jun 2007, 01:34 PM
Hello Stephen

Thank you for replying. The problem is that I never recieved  the reply from Vlad. I do not know why, but I didn't. Could you please have Vlad or someone on the support team resend the support and the sample project attatched to this ticket?

Thank you very much
Steve
0
Steve
Telerik team
answered on 21 Jun 2007, 01:48 PM
Hi Stoop,

I just logged in your account and I am able to see the reply from my colleague in "My Support Tickets" section (it is your only ticket). Please verify that you are able to see the reply there as well. We do send reply emails to your specified email, but we are not responsible for any spam filters or anything else that might have prevented you from receiving the reply. That's why the safest way is to regularly check the Support section in your account.

Greetings,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Stoop
Top achievements
Rank 1
answered on 21 Jun 2007, 03:38 PM
Hello

Yes, I do see the support ticket reply. It was my first support ticket and did not realize there was a "My Support Tickets" area. I assumed that the reply would be posted here in the forum..

Anyway, thank you for the response and the work around for this problem. I am confident that your team will incorporate this fix in an upcoming release. Furthermore,  I am loking forward to using your company's products in our project.

Thanks again for your support
Steve
0
John Snyder
Top achievements
Rank 1
answered on 28 Dec 2007, 08:49 PM
Stoop -
I have run into the same odd situation that you encountered.  I am using the newest Promethious version (Q3 2007). Can you summarize what the problem was or what the solution was?  I'd rather not have to recreate the probelm in another project and send it in if I don't have to.
0
Stoop
Top achievements
Rank 1
answered on 29 Dec 2007, 06:16 AM
Hello Dustin

Mmmm.. apparently Telerik has not fixed this bug yet..Anyway, the workaround is that you must add the following method to every web form (or content page if using Master pages) that use dynamically created controls:

void ThisContentPage_AjaxSettingCreated(object sender, RadAjaxControl.AjaxSettingCreatedEventArgs e)
{

e.UpdatePanel.UpdateMode =

UpdatePanelUpdateMode.Always;

}

This seeemed to do the trick for me - hope it helps
Steve

Tags
Ajax
Asked by
Stoop
Top achievements
Rank 1
Answers by
Chris Gillies
Top achievements
Rank 1
Stoop
Top achievements
Rank 1
Vlad
Telerik team
Sebastian
Telerik team
Steve
Telerik team
John Snyder
Top achievements
Rank 1
Share this question
or