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

RadFormDecorator Issue with dynamically loaded controls

1 Answer 66 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 13 Jul 2012, 04:00 PM
Hi,

We are currently experiencing an issue in IE8 and IE9 (although I have not tested it in other browsers), where we have a RadFormDecorator on a master page targeting only buttons.  We have several user controls and pages that include their own ASP.NET AJAX UpdatePanels.  It seems when we add controls, such as adding rows with buttons to a GridView dynamically, an issue arises where upon window.unload event fire, the Core.js library iterates through all the telerik controls it is aware of on the page and attempts to dispose of any associated handlers.  There is an assumption within specifically, window.$telerik._removeHandler that attempts to dereference the _events member of an argument passed in but there is no _events member and so a null argument exception bubbles up to the user before, preventing the page from posting until the user acknowledges the error. 

I am guessing that the RadFormDecorator is keeping track (via the DOM) of the items it is manipulating and since the buttons are being added dynamically, they are somehow circumventing the registration process that RadFormDecorator is using and so when the window.unload event fires, that information that is assumed to exist is not present.  This is again, just a guess.

We have attempted several of the suggestions found on this forum and on the web but to no avail, specifically:
1. changing the rendering mode to IE7 mode
2. hooking into the client-side api via ASP.NET AJAX pageLoad(sender, args){telerik.decorator.decorate()}
3. changing out the ASP.NET AJAX UpdatePanel with a RadUpdatePanel
4. changing the location of the RadFormManager to the end of the MasterPage

Some of the above solutions don't entirely make sense to us but they were worth trying and ultimately did not solve the problem.  Please advise - your feedback is greatly appreciated.

Thank You

Andrew

EDIT: We are using version 2012.1.411.40

1 Answer, 1 is accepted

Sort by
0
Niko
Telerik team
answered on 18 Jul 2012, 12:31 PM
Hi Andrew,

Such an issue is likely to occur if there is a piece of code that tries to clear all the handlers attached to a DOM element, thus removing the form decorator event handlers, which will result in the mentioned JS error. Please, check if there is a place in your code where $clearHandlers is called.
Otherwise you should provide a sample runnable project that demonstrates the issue at hand in order for me to reproduce it and investigate it in details. For that you should open a support ticket and attach the sample code there.

All the best,
Niko
the Telerik team
Explore the entire set of ASP.NET AJAX controls we offer here and browse the myriad online demos to learn more about the components and the features they incorporate.
Tags
General Discussions
Asked by
Andrew
Top achievements
Rank 1
Answers by
Niko
Telerik team
Share this question
or